Really interesting. I am stuck at enabling Apple login within Supabase. I know you said the Secret Key doesn't matter, but I can't save it without something there. What did you do? It needs some JWT.
For any interested, I found the solution. It's convoluted, but I had to sign in to my Apple Dev account, create a key file, generate a secret key (via Ruby) and then update Supabase. It worked, but, man, it's a slog.
Using the supabase-swift 0.3.0 package. signInWithIdToken() throws the error: 'signInWithIdToken' is inaccessible due to '@_spi' protection level This tutorial is very helpful and the intent is obvious. I'm guessing the dev team is trying to enforce one of their other signIn methods for what you have accomplished here.
Thank you for this tutorial, I completed it. I don't have a developer account so I wasn't able to get the flow working to completion where it printed the session, once the popup asked for my apple id password nothing happens when clicking sign in. I will try this again once my Developer account is set up though. This was a really helpful walk-through covering a niche use case that is hard to find documentation on. Thank you! Subscribed.
Im glad you found it helpful! Let me know if you have any issues. Initially it seemed like it was not supported and then I did some playing around and searching and voila!
Is it possible to drop the source code, even just for the SignInApple file. I'm getting a few UI API called on a background thread error messages, I'm sure it is a mistake I've made, but would be great just to clarify exactly what you did to avoid these. The error essentially is coming from the getTopViewController function in the extension of UIApplication. My initial instinct was to wrap the areas in a DispatchQueue.main.async {} closure, but I noticed you didn't need to do that so therefore I'm sure I've just missed a step. Excellent video though, really informative, really agree that this should be within the Supabase documentation too considering the reason most develop in Swift to begin with is for its native feel, when compared with some of the web framework based, mobile app development alternatives.
Hey George just seeing this now. I’ll make sure to upload a copy of it to GitHub tomorrow morning. I’m not near my computer but i think i added the @MainActor to the sign in view model to help with errors like those. Will confirm later And thanks for watching!
I ran into an issue using the extension and topVC not found. I assigned ASAuthorizationControllerPresentationContextProviding to the SignInApple class and then added func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor { return UIApplication.shared.windows.first! // Return an appropriate presentation anchor }
if you get an issue with .signInWithIdToken function you can bring in this import:
@_spi(Experimental) import GoTrue
Hello Jason absolutely great tutorial as always !
But I have a question do you need a developer account(99$/yr) to enable signin with apple ?
dude this is genius, aint no way I would have figured this out! Thanks!
Glad I could help!
Goated with the sauce
Really interesting. I am stuck at enabling Apple login within Supabase. I know you said the Secret Key doesn't matter, but I can't save it without something there. What did you do? It needs some JWT.
For any interested, I found the solution. It's convoluted, but I had to sign in to my Apple Dev account, create a key file, generate a secret key (via Ruby) and then update Supabase. It worked, but, man, it's a slog.
@@benjenkins2415 hi can you share code. I am facing same problem. I generated auth key file and stuck there cannot find secret key
@@benjenkins2415 Yeah I'm facing the same problem right now
Using the supabase-swift 0.3.0 package. signInWithIdToken() throws the error: 'signInWithIdToken' is inaccessible due to '@_spi' protection level
This tutorial is very helpful and the intent is obvious. I'm guessing the dev team is trying to enforce one of their other signIn methods for what you have accomplished here.
Hey, thanks for watching and the update! I will look into this, they made some changes recently which may be causing this.
@@jasondubon Yeah I am now also getting the same error. Epic tutorial as well by the way!
@jasondubon It seems like signInWithIdToken is marked as experimental. I solved this by adding this to my imports:
@_spi(Experimental) import GoTrue
@@anton_n I had the same problem, and that solved it for me. Thank you.
@@anton_n thanks anton!! this is a great work around! I wish Supabase would fix it to help us get native sign in capabilities.
Thank you for this tutorial, I completed it. I don't have a developer account so I wasn't able to get the flow working to completion where it printed the session, once the popup asked for my apple id password nothing happens when clicking sign in. I will try this again once my Developer account is set up though.
This was a really helpful walk-through covering a niche use case that is hard to find documentation on.
Thank you!
Subscribed.
Im glad you found it helpful! Let me know if you have any issues. Initially it seemed like it was not supported and then I did some playing around and searching and voila!
Man I love you. Been working on this today, and couldn't make those SafariViews to work properly, freakin' Callback URLs... it works perfectly now!
😂😂 That’s great! Glad it was helpful
Thank you for posting this! Do you have a github repository for reference to double check syntax of each script in this tutorial example?
Hey Shantalia, I have not uploaded the code yet. Will upload it once finished with series (so in about 2 weeks or so)
I added some of the sign in with apple files to github github.com/MexJason/Supabase-SignInWithApple
If you were facing any issues with that
@@jasondubon The code here isn't usable its missing AuthManager
@@matthewcampbell4047 Hey matt, check this repo bro, github.com/MexJason/SupabaseSwift/tree/main
awesome video as always.
Is it possible to drop the source code, even just for the SignInApple file. I'm getting a few UI API called on a background thread error messages, I'm sure it is a mistake I've made, but would be great just to clarify exactly what you did to avoid these. The error essentially is coming from the getTopViewController function in the extension of UIApplication. My initial instinct was to wrap the areas in a DispatchQueue.main.async {} closure, but I noticed you didn't need to do that so therefore I'm sure I've just missed a step.
Excellent video though, really informative, really agree that this should be within the Supabase documentation too considering the reason most develop in Swift to begin with is for its native feel, when compared with some of the web framework based, mobile app development alternatives.
Hey George just seeing this now. I’ll make sure to upload a copy of it to GitHub tomorrow morning. I’m not near my computer but i think i added the @MainActor to the sign in view model to help with errors like those. Will confirm later And thanks for watching!
Here is the link to the repo: github.com/MexJason/Supabase-SignInWithApple
@@jasondubon came for this too. Thank man. And thanks for the video!
@@jasondubon actually would you mind sharing the rest of the code too? seems like I'm making some stupid mistakes somewhere. Thank you!
I ran into an issue using the extension and topVC not found. I assigned ASAuthorizationControllerPresentationContextProviding to the SignInApple class and then added
func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor {
return UIApplication.shared.windows.first! // Return an appropriate presentation anchor
}
This is good to know, thanks for sharing!
@@jasondubon welcome and overall great video