supabase-community / gotrue-swift

A Swift client library for GoTrue.
MIT License
36 stars 31 forks source link

Add `signInWithApple` method #51

Closed dshukertjr closed 1 year ago

dshukertjr commented 1 year ago

Feature request

Is your feature request related to a problem? Please describe.

We recently added a signInWithApple() method on Flutter library, and was wondering if it would make sense to add it on the Swift library as well. You can see the implementation here. Feel free to ask any questions about it! https://github.com/supabase/supabase-flutter/blob/main/lib/src/supabase_auth.dart#L366

deviprsd commented 1 year ago

@dshukertjr I would like to add that signInWithApple() has requested scope for .fullName but the .identityToken doesn't include that. And I don't seem to be able to find out how the name is passed along to the API. Something that needs to thought about.

dshukertjr commented 1 year ago

@deviprsd That is happening probably because by Apple only returns the email and fullname on initial sign in. https://developer.apple.com/forums/thread/121496

grdsdev commented 1 year ago

@dshukertjr I started working on this, but I saw some discussions about removing that method from flutter lib, so I'm just adding some example on the repository on how to implement native SIWA using gotrue-swift.

dshukertjr commented 1 year ago

@grsouza Thanks, I think that is the right approach!