like-gold
like-goldā€¢2y 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
xenophobic-harlequin
xenophobic-harlequinā€¢2y 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.
like-gold
like-goldā€¢2y ago