fascinating-indigo
fascinating-indigoโ€ข17mo ago

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 ๐Ÿ™โ€
useLogin | refine
useLogin data hook from refine is a modified version of react-query's useMutation for authentication.
No description
2 Replies
continuing-cyan
continuing-cyanโ€ข17mo ago
Hey @ๅŠ‰ๅ“ฒๅฎ‡, The problem is not related with refine. You need to update redirect url on google auth. Probaply the user goes to the a login page after the log in comes back by default to localhost:3000.
fascinating-indigo
fascinating-indigoโ€ข17mo ago