https://supertokens.com/ logo
#support-questions
Title
# support-questions
e

EdwinN1337

06/13/2022, 9:53 AM
struggling again with capacitor 🙂 We have to provide a callback url, problem is with Google, we can't pass our custom url scheme, only https links are allowed
Copy code
js
    if (platform === 'APP') {
      url.searchParams.append('redirect_uri', `${APP_BUNDLE_URL}/auth/callback/${provider}`)
      await openAppBrowser(url.href)
    }
    if (platform !== 'APP') {
      url.searchParams.append('redirect_uri', `${FRONTEND_URL}/auth/callback/${provider}`)
      window.location.href = url.href
    }
I was thinking of initliazing a different backendConfig based on the request? Not sure if that's the right approach? Anyone have done this before?
r

rp

06/13/2022, 10:16 AM
hey @EdwinN1337 You can put an https link for google which hits your API, and then your API can redirect the user to the custom scheme link.
e

EdwinN1337

06/13/2022, 10:31 AM
Lol haven't thought of that, thanks 🤣🤣