diff --git a/src/classes/Auth/Auth.ts b/src/classes/Auth/Auth.ts index b9358b4..c6663bb 100644 --- a/src/classes/Auth/Auth.ts +++ b/src/classes/Auth/Auth.ts @@ -83,8 +83,10 @@ export class Auth extends PassageBase { try { const { language, magicLinkPath, redirectUrl, ttl } = options ?? {}; + let userId: string | undefined = undefined; let channel: MagicLinkChannel; if ('userId' in args) { + userId = args.userId; channel = args.channel; } else if ('email' in args) { channel = MagicLinkChannel.Email; @@ -96,11 +98,13 @@ export class Auth extends PassageBase { appId: this.config.appId, createMagicLinkRequest: { ...args, + // eslint-disable-next-line camelcase + user_id: userId, + channel, language, magic_link_path: magicLinkPath, redirect_url: redirectUrl, ttl, - channel, }, });