Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[Firebase Auth] added access to User metadata #718

Merged
merged 3 commits into from
Oct 3, 2018

Conversation

LucasParsy
Copy link
Contributor

@LucasParsy LucasParsy commented Aug 14, 2018

allows to recover the account creation date, and the last sign in date of an user.

With them, you can determine if a user logs in for the first time.
(and then, create a welcome/ setup page, for example)

this metadata field was available in both native API, as shown in the documentation.
https://developers.google.com/android/reference/com/google/firebase/auth/FirebaseUser.html#getMetadata()

I implemented its access in the Dart library.

example usage:

  final FirebaseAuth _auth = FirebaseAuth.instance;
  FirebaseUser _currentUser = await _auth.currentUser();
  if (user.metadata.creationTimestamp ==  user.metadata.lastSignInTimestamp)
     ...

Copy link
Contributor

@kroikie kroikie left a comment

Choose a reason for hiding this comment

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

@LucasParsy This change looks good to me, thanks! Could you please make and update to the change log and bump the version number

@LucasParsy LucasParsy force-pushed the master branch 3 times, most recently from cd17003 to 684bbc9 Compare September 11, 2018 20:37
@LucasParsy
Copy link
Contributor Author

LucasParsy commented Sep 11, 2018

I merged my change with the HEAD. (8178bf1)

@LucasParsy
Copy link
Contributor Author

hello, could you merge my commit?
I updated it to work with the master branch, and I would like to use the official hosted plugin instead of my local one.
and according to the thumbs ups, some people are interested in this feature too

LucasParsy and others added 2 commits October 2, 2018 18:01
allows to recover the account creation date, and the last sign in date
of an user.

With them, you can determine if a user logs in for the first time.
(and then, create a welcome/ setup page, for example)
@kroikie
Copy link
Contributor

kroikie commented Oct 3, 2018

@LucasParsy thanks for the PR!

@kroikie kroikie merged commit e920cf7 into flutter:master Oct 3, 2018
andreidiaconu pushed a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
andreidiaconu added a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
julianscheel pushed a commit to jusst-engineering/plugins that referenced this pull request Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants