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
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Deep Linking & Password reset
I am using react native with expo. I want to implement deep link with the url recived via email. So when clicked the link it opens my app. I havent ever used de...