Back

O-Auth success redirect URL for mobile not valid

  • 0
  • Auth
  • Apple
  • Cloud
pedronveloso
4 Oct, 2024, 16:34

I'm using AppWrite's own host to build an O-Auth for an iOS app, and on the client side I'm doing something like this:

"“ let successURL = "myappbundle ://auth-callback"

TypeScript
            let redirectURL = try await account.createOAuth2Token(
                provider: .notion,
                success: successURL,
                scopes: []
            )

"

Which is how I assume AppWrite will setup the final redirect to my app. However upon runtime, trying to execute that piece of code results in a html response that contains the following message:

"Invalid success param: URL host must be one of: localhost, cloud.appwrite.io, appwrite.io"

If I use "cloud.appwrite.io" as the success redirect URL for example, I'm able to get the function to execute, and I can see on the dashboard that the user got created, but safari will never redirect back to my app. What I'm I missing here? Is there somewhere on the dashboard where I can add the deep link of the success redirect to the "accepted hosts"?

TL;DR
The developer is trying to set up an O-Auth for an iOS app with AppWrite. The error message states that the success URL host must be one of the specified options. The dashboard does not have a specific place to add the deep link of the success redirect to the accepted hosts.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more