Sign in with Apple on Expo React Native
VloĆŸit
- Äas pĆidĂĄn 19. 06. 2024
- Sign in with Apple[0] makes it easy for users in native iOS apps to sign in using their Apple ID, and it is an requirement[1] for apps that use a third-party or social login service (such as Facebook Login, Google Sign-In, Sign in with Twitter, Sign In with LinkedIn, Login with Amazon, or WeChat Login).
Expo's AppleAuthentication library[2] provides Apple authentication for iOS 13+ and allows you to conveniently test it in Expo Go without needing an Apple Developer account. We're excited to see what you'll be building! đ
Read the docs: supabase.com/docs/guides/auth...
React Native Authentication blog post: supabase.com/blog/react-nativ...
đïž Presented by Thor Schaeff (@thorwebdev go.thor.bio/x)
Chapters
00:00 Intro
00:25 Apple App Store requirements
02:26 Create a new Expo TypeScript Project
03:55 Install and configure Expo AppleAuthentication
04:55 Create a native auth button component
09:05 Inspect the Apple identity token
10:20 Configure Sign in with Apple for local development
11:55 Install and configure supabase-js in React Native
14:16 Sign in with ID token in Supabase Auth
15:05 Inspect user in the Supabase Dashboard
15:30 Configure your hosted Supabase project
[0] developer.apple.com/sign-in-w...
[1] developer.apple.com/app-store...
[2] docs.expo.dev/versions/latest... - VÄda a technologie
what i love is that the hard part is getting information from apple developpers account to put in supabase but no video show how and where to get it
I was actually wondering about that đ Have you found a good guide for that by now?
Alot has already changed but this guide truely is still very much appriciated! Thanks. Love the videos bro.
It would be great to have a web version of this tutorial, as it's difficult to find any articles or videos about it.
Awesome ! Is there any easy way / tutorial, to have 3 types of sign in available at the same time ?
I mean by that having Google / Apple / Email sign in working together ?
There is a way to use a webhook to listen user.cretate event to sync with my database ?
This has one issue. For some reason, Sup abase is only adding the email to the database. It does not add the full name. This forces developers to build a workaround to insert user data. In cases where onAuthStateChanges is listening for login, it could cause for some unnecessary coding
What about using react-native-apple-authentication if you're not using Expo? Does that work? I'm getting "Passed nonce and nonce in id_token should either both exist or not.", which suggests it doesnt work, even though its stated as a vague solution on the signin with Apple page in the supabase documentation.
That was super helpful.
Can explain How can do this in IOS environment ?
so if we want to use the sign im with apple we need imperativly an mac or an iphone . i ask you that cuz i'm building my reactbapp on a windows laptop
Yes, you will either need a Mac with iOS Simulator or a physical iOS device.
How to delete user from Authentication? I mean delete user totally!
See here: supabase.com/docs/reference/javascript/auth-admin-deleteuser . Note that this needs to be done with your service_role (secret) key in a secure server-side enviroment!
This action can also be performed in the Supabase Dashboard manually when you're logged in as an admin!
How on earth Apple get away with forcing people to use apple signin if you're using 3rd party auth is beyond me. Imagine if MSFT had tried to do that in the 1990s.
Microsoft do that now in 2024 lol