wispy-oliveW
Refine•3y ago•
2 replies
wispy-olive

How to set redirect after login for Google Auth

ā„¹ļø info
I'm using Google Auth as authProvider
I followed the docs and added return Promise.resolve("/clients"); in my authProvider
https://refine.dev/docs/api-reference/core/hooks/auth/useLogin/#redirection-after-login
But it does not work

ā“ issue
1. Wrong redirect
My first menu url is {{url}}/projects, after I logged in, it will redirect to {{url}}/projects, but it should be {{url}}/clients

2. Wrong hostname
I've deploy my site to Netlify
After I logged in, it will return to localhost:3000/projects not the Netlify app url.

Could you help me to resolve the redirect issue šŸ™ā€
d35b2bc949a09f32.png
useLogin data hook from refine is a modified version of react-query's useMutation for authentication.
useLogin | refine
Was this page helpful?