Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace redirect url pattern with route key pattern #398

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
fix: sgidLoginButton to use router.push instead of window.location
zhongliang02 committed Jan 20, 2025
commit 035ac17e69e9d7d44b141295cf339239b4508946
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ export const SgidLoginButton = (): JSX.Element | null => {
const router = useRouter()
const sgidLoginMutation = trpc.auth.sgid.login.useMutation({
onSuccess: async ({ redirectUrl }) => {
window.location.href = redirectUrl
await router.push(redirectUrl)
},
})