Skip to content

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

Merged
merged 9 commits into from
Jun 24, 2020

Conversation

scottcrossen
Copy link
Contributor

@scottcrossen scottcrossen commented Apr 24, 2020

Sent with my hg client

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 24, 2020

Binary Size Report

Affected SDKs

  • firebase

    Click to show 12 binary size changes.
    Type Base (a575f2d) Head (ded1ba5) Diff
    firebase-analytics.js 26.5 kB 26.5 kB -2 B (-0.0%)
    firebase-auth.js 173 kB 173 kB +14 B (+0.0%)
    firebase-database.js 186 kB 186 kB -2 B (-0.0%)
    firebase-firestore.js 288 kB 288 kB +9 B (+0.0%)
    firebase-firestore.memory.js 230 kB 230 kB +9 B (+0.0%)
    firebase-functions.js 9.60 kB 9.60 kB -2 B (-0.0%)
    firebase-installations.js 19.2 kB 19.2 kB -2 B (-0.0%)
    firebase-messaging.js 39.1 kB 39.1 kB -2 B (-0.0%)
    firebase-performance.js 38.3 kB 38.3 kB -2 B (-0.0%)
    firebase-remote-config.js 36.9 kB 36.9 kB -2 B (-0.0%)
    firebase-storage.js 40.8 kB 40.8 kB -2 B (-0.0%)
    firebase.js 821 kB 821 kB +2 B (+0.0%)

Test Logs

@scottcrossen scottcrossen force-pushed the slc/additionaluserinfo branch from 48a27b2 to fa973c9 Compare April 27, 2020 20:35
@scottcrossen scottcrossen force-pushed the slc/additionaluserinfo branch 2 times, most recently from fd8bd0c to b5b8917 Compare May 7, 2020 18:31
@scottcrossen scottcrossen force-pushed the slc/additionaluserinfo branch 4 times, most recently from c60404f to 98010cb Compare June 16, 2020 23:20
export interface AdditionalUserInfo {
readonly isNewUser: boolean;
readonly profile?: UserProfile;
readonly providerId: ProviderId | null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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:

Copy link
Contributor

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;
Copy link
Contributor

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

Copy link
Contributor Author

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) {

@avolkovi avolkovi assigned scottcrossen and unassigned avolkovi Jun 17, 2020
@avolkovi avolkovi removed their assignment Jun 17, 2020
avolkovi and others added 8 commits June 23, 2020 14:47
* 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
@scottcrossen scottcrossen force-pushed the slc/additionaluserinfo branch from 8d3cce3 to 3f74da0 Compare June 23, 2020 21:47
*/
export function _fromIdTokenResponse(
idTokenResponse: IdTokenResponse,
): AdditionalUserInfo | null {
Copy link
Contributor

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

@scottcrossen scottcrossen merged commit d232313 into auth-next Jun 24, 2020
avolkovi pushed a commit that referenced this pull request Jul 8, 2020
@firebase firebase locked and limited conversation to collaborators Jul 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants