You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 9, 2022. It is now read-only.
I've seen this registration failure maybe a dozen times recently; I don't know how the callback endpoint gets hit with a user object that ends up being all null mind you! It happened three times today, but that may have been the same user. Could it be one of the providers not sending back all the information we're expecting?
[2017-07-17 13:08:19] [ERROR] AuthenticationFacade:261 - Internal Database error during authentication
uk.ac.cam.cl.dtg.segue.dao.SegueDatabaseException: Postgres exception
at uk.ac.cam.cl.dtg.segue.dao.users.PgUsers.createUser(PgUsers.java:515)
at uk.ac.cam.cl.dtg.segue.dao.users.PgUsers.createOrUpdateUser(PgUsers.java:392)
at uk.ac.cam.cl.dtg.segue.dao.users.PgUsers.registerNewUserWithProvider(PgUsers.java:63)
at uk.ac.cam.cl.dtg.segue.api.managers.UserAccountManager.registerUserWithFederatedProvider(UserAccountManager.java:1311)
at uk.ac.cam.cl.dtg.segue.api.managers.UserAccountManager.authenticateCallback(UserAccountManager.java:290)
at uk.ac.cam.cl.dtg.segue.api.AuthenticationFacade.authenticationCallback(AuthenticationFacade.java:236)
...
Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "email" violates not-null constraint
Detail: Failing row contains (63702, null, null, null, null, STUDENT, null, null, 2017-07-17 13:08:19.482, null, null, null, NOT_VERIFIED, null, null, null, null, null, null, null).
...
at uk.ac.cam.cl.dtg.segue.dao.users.PgUsers.createUser(PgUsers.java:500) ~[classes/:?]
... 47 more
The only non-null rows are those either generated by the database, or default values. Maybe we're not validating the callback carefully enough?
The text was updated successfully, but these errors were encountered:
# We're currently seeing errors with null user object fields when users try to
# register with Facebook. This seems to be because their API changed recently
# to stop sending all info when requesting the user info endpoint. We now have
# to be explicit about what we want from that endpoint. May want refactoring later,
# but this works and it's an urgent issue!
# Requires the line:
# FACEBOOK_USER_FIELDS=id,first_name,last_name,email,verified
# to be added to the segue-config.properties file to work.
# Relevant to isaacphysics/isaac-app#867
So this turned out to be Facebook, and it happens because the only thing they now return when you request the user info endpoint is the ID of the user. You need to manually and explicitly request the fields you want. Meurig found this: https://developers.facebook.com/docs/graph-api/using-graph-api/#reading
The way I've fixed it isn't too neat, so it may want looking at by @sacummins at some point!
I've seen this registration failure maybe a dozen times recently; I don't know how the callback endpoint gets hit with a user object that ends up being all null mind you! It happened three times today, but that may have been the same user. Could it be one of the providers not sending back all the information we're expecting?
The only non-null rows are those either generated by the database, or default values. Maybe we're not validating the callback carefully enough?
The text was updated successfully, but these errors were encountered: