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 Jun 30, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 30, 2023. It is now read-only.
Firebase Auth token with null email address is resulting in a null User #189
I am running into an issue with users being unable to call my backend API that is guarded by Endpoints Framework. I've traced the issue to the below line of code within Auth. authenticateAppEngineUser.
The circumstances surrounding this issue has to do with accounts that have been created which do not have an associated email address. A reproducible example is if a user signs in with Facebook, where the Facebook account itself was created using a mobile number.
Note: The JWT is parsing fine, and I can see that the user ID is set correctly, it's just the email that is null.
The majority of my Firebase accounts authenticate perfectly fine, it's this limited subset of users without email addresses that has the issue.
I can see that the com.google.appengine.api.users.User class expects the email address is never null, so I can understand that the email check is avoiding the eventual NullPointerException that would occur during construction. However, why couldn't the presence of either email or user ID be enough to have a valid User object? I do not require the email for any of my API code.
Activity