Skip to content

Conversation

@renatoc8
Copy link
Contributor

@renatoc8 renatoc8 commented May 1, 2019

This pull request implements the GetUser() function in FirebaseAuth, closely following the implementation found in the firebase-admin-java project.

@hiranya911
Copy link
Contributor

Thanks @renatoc8. I think we'll need the exact API structure currently available in Java. Specifically, we'd want to have an IUserInfo interface and have UserRecord implement it. Providers should also implement the same interface.

Other high-level comments:

  1. We can remove the FirebaseAdmin.Auth.Internal namespace. Just put those classes in the Auth namespace, and mark them as internal.
  2. The public method name should be GetUserAsync(). And we'd also need an overload that accepts a cancellation token.
  3. All constructors of UserRecord should be internal.

@renatoc8
Copy link
Contributor Author

renatoc8 commented May 1, 2019

Thanks for reviewing my pull requests. I will get those changes implemented shortly.

renatoc8 added 2 commits May 1, 2019 15:14
…seAdmin.Auth.

-Renamed GetUser() to GetUserAsync(), and added an overload that accepts a cancellationToken.
-Added IUserInfo and implemented it in UserRecord and ProviderUserInfo.
@renatoc8
Copy link
Contributor Author

renatoc8 commented May 1, 2019

Ok, those changes have been implemented. Anything else you can think of @hiranya911 ?

Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

Thanks @renatoc8. Looks mostly good. I've pointed out a few minor things to change. Also note that Travis CI is detecting a test failure, that should be fixed.

@renatoc8
Copy link
Contributor Author

renatoc8 commented May 2, 2019

@hiranya911 I believe I've marked all of the conversations as resolved, but I'm not sure how to mark the requested changes as complete. Is there anything else I have to do?

Copy link
Contributor Author

@renatoc8 renatoc8 left a comment

Choose a reason for hiding this comment

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

Trying to mark the requested changes as completed. My apologies if this is the wrong place.

Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

Thanks @renatoc8. I think we are almost there. Just pointed out what I think is the last set of comments I have on this implementation.

Since this is a new API for this SDK, we also need to get it approved internally. I'm working on that right now.

…nse.

Converted ProviderUserInfo to be an internal class, with auto properties.
Fixed the FirebaseUserManagerTest test so that it would fail when instantiating a UserRecord class with a uid that's longer than 128 characters.
Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Hang tight until our internal API review process is complete. I'll merge it then.

@hiranya911
Copy link
Contributor

@renatoc8 can you also add a line to the CHANGELOG file at the root of this repo?

@renatoc8
Copy link
Contributor Author

renatoc8 commented May 3, 2019

Added the entry to CHANGELOG.

@hiranya911
Copy link
Contributor

This API is still under review. But I'll go ahead and merge the PR. If any changes are suggested by the review team, we can implement them separately.

@hiranya911 hiranya911 merged commit b9ca619 into firebase:master May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants