mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
fix(server): remove default auth redirect url (#8140)
This commit is contained in:
@@ -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)}`);
|
||||
|
||||
@@ -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)}`);
|
||||
|
||||
Reference in New Issue
Block a user