I'm trying to use custom tokens for authenticating a user that uses AppleSignIn in an iOS app.
I don't like the OAuth2 implementation for Apple because it kicks the user out of my app, loads Safari to present the authentication screen, then prompts the user "Do you want to open "MyAppName"?" after authentication before finally returning them to my app - which is much, much less than ideal for the user experience.
So to avoid that, I'm handling the AppleSignIn within the app then sending the identityToken to an appwrite function that validates it, then creates an Appwrite user account and generates a custom token (with a 5 minute expiry) that gets returned to the app.
The app exchanges the custom token for a session with: Accounts.createSession(userId: secret:)
That all works - but the providerRefreshToken value is blank and I'm unsure of how to handle refreshing the session.
What is the recommended way to refresh an Appwrite session that was created using a custom token?
Recommended threads
- is `account.get()` safe to be used in th...
I want to user's `id` for authentication. However, a while ago I was told in this server not to use `account.get()` and instead add user preferences for that us...
- Usage of the new Client() and dealing wi...
Hey guys, just a quick one - we had some web traffic the other day and it ended up bombing out - To put in perspective of how the app works, we have a Nuxt Ap...
- [Beginner] CLI --queries Syntax Error & ...
Hi everyone! I am a beginner with Appwrite and trying to use the CLI, but I'm stuck with a syntax error. Any guidance would be greatly appreciated! 🙏 **Enviro...