Skip to content

Commit

Permalink
fix(authentication): magic link hook verificationToken url param (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
kon14 committed Jun 30, 2023
1 parent 810cf4f commit 9d3d902
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/authentication/src/handlers/magicLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class MagicLinkHandlers implements IAuthenticationStrategy {
async sendMagicLink(call: ParsedRouterRequest): Promise<UnparsedRouterResponse> {
const { email } = call.request.params;
const { clientId } = call.request.context;
const user: User | null = await User.getInstance().findOne({ email: email });
const user: User | null = await User.getInstance().findOne({ email });
if (isNil(user)) throw new GrpcError(status.NOT_FOUND, 'User not found');

const token: Token = await Token.getInstance().create({
Expand All @@ -101,7 +101,7 @@ export class MagicLinkHandlers implements IAuthenticationStrategy {
}

async verifyLogin(call: ParsedRouterRequest): Promise<UnparsedRouterResponse> {
const { verificationToken } = call.request.params.verificationToken;
const { verificationToken } = call.request.params;
const config = ConfigController.getInstance().config;
const uri = call.request.params.redirectUri;
const redirectUri =
Expand Down

0 comments on commit 9d3d902

Please sign in to comment.