Code Monkey home page Code Monkey logo

Comments (4)

dshukertjr avatar dshukertjr commented on August 10, 2024

When a user signs in using Apple for the first time for the app, Apple will provide the full name and email address if the user approves it. The full name and email address will be available in the raw user metadata the same way as Google login, and you can use triggers to store them in any table that you would like.

If you are not seeing the full name and email address after completing the Apple sign in, it means that the user has signed-in on the same app before.

from flutter-auth-ui.

domhel avatar domhel commented on August 10, 2024

I don't see this happening, even in production. I even added analytics logs to my app whenever someone signs up using apple, and the metadata have never been there. There are also open issues on supabase. The only thing that is working is this workaround that others have proposed and that I am using now and have started in my fork.

from flutter-auth-ui.

dshukertjr avatar dshukertjr commented on August 10, 2024

Could you link the issues that you have found discussing this topic? If it's an existing bug, we should fix it the proper way. The Supabase auth server should be storing that information on the user's metadata.

from flutter-auth-ui.

domhel avatar domhel commented on August 10, 2024

Here the references:

However, I've seen this comment from you:

@takuya-ohmuro Currently, Supabase does request for email and full name scope when performing Apple sign in. You can retrieve the full name like this:

final response = await supabase.auth.signInWithApple();
print(response.user?.userMetadata?['full_name']);

But the method signInWithApple does not exist anymore. Instead, the native apple sign in is used and then the signInWithIdToken.
I don't even know why it should work, because the native apple sign in returns the full name in the credentials, but these credentials are only used for the identity token and the name is thrown away. Maybe I don't see the hidden magic here. Also, I don't know how the old function worked, maybe you know more.

Another option that I have not tested yet is at the _nativeAppleSignIn() call, the return type is ignored. Per haps that auth response holds the metadata and we would then have to call supabase.auth.updateUser with that metadata, but would still not be a pretty way to handle this.

from flutter-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.