Hi all, so I want to use a custom URL for the success parameter, but I still want to get the session id query. Here is my current code:
let newSession = try await account.createOAuth2Session(
provider: "apple",
success: "path/{sessionId}",
)
How I can access the session id if I'm using a custom url for the success parameter?
For apple, using our SDK, you should omit the success parameter
The SDK automatically handles the session
But if I omit the success parameter, the users will see this error screen. If I pass the success parameter, this screen will not shown
Happened to me
What shows instead?
Nothing will be shown. It will just show the pop up to open my app, which I guess is the expected behavior? but when I open my app, it will crash because it can't get the cookies from the redirect URL
You're not supposed to try and get the cookie. Appwrite SDK handles it automatically
So, do you have any suggestion on how to solve this missing redirect URL error?
maybe you can use this as the success url:
appwrite-callback-[PROJECT_ID]://localhost/auth/oauth2/success
Either that or host your own page that redirects the user like the console does, but doesn't show the missing redirect url.
Recommended threads
- Error: User (role: guests) missing scope...
I want to send a verification code to the user and the given phone number and check it and create a session right after the user entered the secret. For me that...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...
- How to verify an user using AppWrite Fun...
I have seen similar questions but none whose solutions serve me. I have a function to verify a user with their secret and their id: https://blahblah.appwrite.gl...