-
Notifications
You must be signed in to change notification settings - Fork 944
Add AdditionalUserInfo class to auth-exp #2979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Binary Size ReportAffected SDKs
Test Logs
|
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
48a27b2
to
fa973c9
Compare
fd8bd0c
to
b5b8917
Compare
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
c60404f
to
98010cb
Compare
export interface AdditionalUserInfo { | ||
readonly isNewUser: boolean; | ||
readonly profile?: UserProfile; | ||
readonly providerId: ProviderId | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
providerId can't be null https://firebase.google.com/docs/reference/js/firebase.auth#additionaluserinfo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well that just isn't true:
providerId = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh, i wonder if our docs need to be updated then
*/ | ||
export interface AdditionalUserInfo { | ||
readonly isNewUser: boolean; | ||
readonly profile?: UserProfile; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
profile should be UserProfile | null
, it's not optional https://firebase.google.com/docs/reference/js/firebase.auth#additionaluserinfo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs are wrong on this as well. It's never set for the base info:
fireauth.GenericAdditionalUserInfo = function(info) { |
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
packages-exp/auth-exp/src/core/user/additional_user_info.test.ts
Outdated
Show resolved
Hide resolved
* Add conditional delays to auth-next * [AUTOMATED]: Prettier Code Styling * Use typescript asserts keyword for typesafe assertions * [AUTOMATED]: Prettier Code Styling * Rebase conflicts & PR feedback * More PR Feedback * Strip debug asserts from prod builds * [AUTOMATED]: Prettier Code Styling * [AUTOMATED]: API Reports * Fix logic in assertion * Revert merge artifacts * PR Feedback
Added React Native persistence class
8d3cce3
to
3f74da0
Compare
*/ | ||
export function _fromIdTokenResponse( | ||
idTokenResponse: IdTokenResponse, | ||
): AdditionalUserInfo | null { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just raised a big PR to make UserCredential accept generics properly. Not for this PR but eventually we'll probably want to make this function generic as well.
See for example: https://github.com/firebase/firebase-js-sdk/pull/3266/files#diff-4e1f7cb1a27ae1754eb03b583f5607ccL389
Sent with my hg client