Hi supertokens, how can I implement redirect to th...
# support-questions-legacy
f
Hi supertokens, how can I implement redirect to the initial entry point after a successful sign in using custom UI (nextjs setup)? I'm trying to capture the path and pass that as a searchparam query to the /auth page, and when a user clicks a provider, the handler picks up the searchParam. I have the following set up with google:
Copy code
ts
authUrl =
    await getAuthorisationURLWithQueryParamsAndSetState({
       thirdPartyId: "google",
       frontendRedirectURI: `${frontendAppInfo.websiteDomain}/auth/callback/google${postLoginRedirectPathQuery}`,
    });
But then I get a warning from google that the request is invalid. In their docs they specify that rediect uris cannot contain open redirects ( https://developers.google.com/identity/protocols/oauth2/web-server#uri-validation ). How else would one go about implementing this? Thank you.
2 Views