Hi, so I am using the prebuilt ui from supertokens...
# support-questions
g
Hi, so I am using the prebuilt ui from supertokens. I'm appending a query param
redirect
on the url to redirect the user to a specific page after login. does supertoken support this functionality or how can I implement this using overrides? which function will i have to override?
r
hey! We do support this. Which recipe are you using?
Assuming you are using thirdpartyemailpassword, you can do this like mentioned here: https://supertokens.com/docs/thirdpartyemailpassword/pre-built-ui/auth-redirection
g
this method always gives me the google auth url or undefined
r
what do you mean?
How are you redirecting the user to the login page?
g
i'm sending a link to the user to accept invites into workspace, the link is of the form domain.com/auth/?redirect=some-url&other-query-params=something
r
oh i see. Use the query param
redirectToPath
instead of using
redirect
g
okay, let me try with this
okay, i'm getting the url, but what if i want some query params too with it?
i'm creating the url like this
r
> what if i want some query params too with it? In that function, you can just read the query params from the current URL