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
- I am currently seeking opportunities as ...
Hey! š I'm a Shopify guy. Been building stores for 8+ years. Still haven't lost my mind. Barely. I make stores that don't suck fast, smooth, and actually built...
- Apple OAuth2 "Registration Not Complete"...
I'm getting a "Registration Not Complete" error when implementing Apple Sign In OAuth2 on self-hosted Appwrite. Environment: Self-hosted Appwrite (latest), iOS...
- Cannot use Apple Oauth2 in React Native/...
Hi! I've trying to add the Apple sign in feature into my Expo App. I followed the docs, but I still receiving the error "Cannot set 'location.href'". Can someon...