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
@@ -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);