Code Monkey home page Code Monkey logo

Comments (7)

sam0829 avatar sam0829 commented on July 28, 2024 1

timestamp can't be used to determine new user as I read they aren't reliable sometime. However I do believe the metadata can be useful to others so I'll definitely look into exposing them as well.

from firebase_auth_ui.

sam0829 avatar sam0829 commented on July 28, 2024

Hi, unfortunately it looks like it's not possible to determine that directly. But since the plugin returns UID of user, you can query your firestore database to see if the user with same UID exists or not. And if not, you can insert the user data. I'll see if there's some way I can expose the boolean with FirebaseUser.

from firebase_auth_ui.

cyberlahy avatar cyberlahy commented on July 28, 2024

But this will cost firestore extra reads every time an user sign in

from firebase_auth_ui.

sam0829 avatar sam0829 commented on July 28, 2024

Yes that can be a problem. I checked again and I see there's hope for Android but couldn't find if iOS's native SDK exposes such boolean. Will keep you posted if I find something :)

from firebase_auth_ui.

sam0829 avatar sam0829 commented on July 28, 2024

@cyberlahy I can confirm there's way to determine new users without querying for both the platforms. Will add a boolean property in my next update. Thanks for bringing this to attention.

from firebase_auth_ui.

cyberlahy avatar cyberlahy commented on July 28, 2024

I see that metadata contains creationTime and lastSignInTime (same value if new user), if you can expose metadata inside FirebaseUser.
Maybe someone needs the client's join date in their app also
thanks

from firebase_auth_ui.

cyberlahy avatar cyberlahy commented on July 28, 2024

Thanks. You can close this issue. I will post a new for features or questions

from firebase_auth_ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.