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
- TSL Certificate Issues
Hi Appwrite Discord Community, I got a problem with my Self-Hosted instance. I only want, that I can use my programm with the Appwrite Backend without .selfSig...
- React Native/iOS platform integrations h...
Anyone else have this issue where platform identifiers have been lost/wiped and no option/field available to update them in the console?
- macOS app: OAuth flow doesn’t start
Hi Appwrite team, I’m integrating the Appwrite Swift SDK into a macOS app and am hitting an environment/runtime issue when starting OAuth. App architecture • ...