mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 09:36:17 +08:00
fix(server): remove default auth redirect url (#8140)
This commit is contained in:
@@ -138,8 +138,7 @@ export class AuthController {
|
||||
res: Response,
|
||||
email: string,
|
||||
callbackUrl = '/magic-link',
|
||||
|
||||
redirectUrl = this.url.home
|
||||
redirectUrl?: string
|
||||
) {
|
||||
// send email magic link
|
||||
const user = await this.user.findUserByEmail(email);
|
||||
@@ -155,7 +154,11 @@ export class AuthController {
|
||||
const magicLink = this.url.link(callbackUrl, {
|
||||
token,
|
||||
email,
|
||||
redirect_uri: redirectUrl,
|
||||
...(redirectUrl
|
||||
? {
|
||||
redirect_uri: redirectUrl,
|
||||
}
|
||||
: {}),
|
||||
});
|
||||
|
||||
const result = await this.auth.sendSignInEmail(email, magicLink, !user);
|
||||
|
||||
Reference in New Issue
Block a user