-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Firebase client always exposes all available credentials
Previously, when passing on the results of an authentication-related event, the Firebase client always exposed an object conforming to the Firebase `UserCredential` type. This contains exactly one user and one credential. In many cases the object itself was synthesized using credentials that we stored ourselves, but the shape of the data was consistent with what Firebase returns when a user successfully logs in. However, this only works if the user has only linked a single provider identity. In the general case, we always want access to all credentials we have for the user—e.g. if the user logs in with Google, we still want access to the stored GitHub credential if there is one. Similarly if the user is initially logged in, logs in in another tab, etc. So, the client ditches the `UserCredential` interface altogether, instead always exposing an object whose properties are `user` and `credentials`. The latter is an array of credential objects. The various consumers of this data are updated to handle a collection of credentials. Note that this also removes the storage of `additionalUserInfo`, i.e. raw profile data from the identity providers. Previously it was necessary to go spelunking in there to find a suitable display name for a user in the case that their account did not have an associated real name. However, since all user accounts will soon be Google-linked, we should be able to guarantee a good display name.
- Loading branch information
Showing
11 changed files
with
87 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.