Diesel
06/15/2022, 12:20 PMgetRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
let redirectUrl = context.redirectToPath
if (redirectUrl !== undefined) {
console.log("yoo redirected path");
console.log(redirectUrl)
// we are navigating back to where the user was before they authenticated
return redirectUrl
}
}
return undefined;
},
I call the sign in with redirectToPath in the url like so
https://auth.my.subdomain.com/auth?redirectToPath=https://www.app.my.subdomain.com
and i get that the context.redirectToPath is empty and it just redirects me to the home page of my auth web instead to my web app.
When i tried setting the web app url hardcoded in the return of getRedirectionURL it works like a charm and redirected me to the web app.
Any idea if this is possible? or only paths are allowed to be redirected to?
(Thanks for the help so far you have given me)rp_st
06/15/2022, 12:21 PMrp_st
06/15/2022, 12:22 PMDiesel
06/15/2022, 12:23 PMrp_st
06/15/2022, 12:24 PMhttps://auth.my.subdomain.com/temp
or something like that, and that page's only purpose is to redrect to the other sub domainDiesel
06/15/2022, 12:25 PMDiesel
06/15/2022, 12:39 PM.eatwoodspoon.com
but they live in different subdomains.
So i cant redirect to the same domain only to the same subdomain?rp_st
06/15/2022, 12:53 PMgetRedirectionURL
function.rp_st
06/15/2022, 12:54 PM