fix(server): remove default auth redirect url (#8140)

This commit is contained in:
forehalo
2024-09-06 06:26:59 +00:00
parent a027cef457
commit 64d2b926a2
4 changed files with 10 additions and 13 deletions

View File

@@ -58,10 +58,7 @@ export const Component = () => {
auth
.signInMagicLink(data.email, data.token)
.then(() => {
// compatible with old client
if (data.redirectUri) {
nav(data.redirectUri);
}
nav(data.redirectUri ?? '/');
})
.catch(e => {
nav(`/signIn?error=${encodeURIComponent(e.message)}`);

View File

@@ -60,9 +60,8 @@ export const Component = () => {
auth
.signInOauth(data.code, data.state)
.then(({ redirectUri }) => {
if (redirectUri) {
nav(redirectUri);
}
// TODO(@forehalo): need a good way to go back to previous tab and close current one
nav(redirectUri ?? '/');
})
.catch(e => {
nav(`/signIn?error=${encodeURIComponent(e.message)}`);