diff --git a/packages/@magic-sdk/provider/src/modules/auth.ts b/packages/@magic-sdk/provider/src/modules/auth.ts index b7489358a..f28da2e2c 100644 --- a/packages/@magic-sdk/provider/src/modules/auth.ts +++ b/packages/@magic-sdk/provider/src/modules/auth.ts @@ -49,12 +49,11 @@ export class AuthModule extends BaseModule { }).log(); } - console.log(configuration); - const { email, showUI = true, redirectURI, variation } = configuration; + const { email, showUI = true, redirectURI, overrides } = configuration; const requestPayload = createJsonRpcRequestPayload( this.sdk.testMode ? MagicPayloadMethod.LoginWithMagicLinkTestMode : MagicPayloadMethod.LoginWithMagicLink, - [{ email, showUI, redirectURI, variation }], + [{ email, showUI, redirectURI, overrides }], ); return this.request(requestPayload); } @@ -79,10 +78,10 @@ export class AuthModule extends BaseModule { * of 15 minutes) */ public loginWithEmailOTP(configuration: LoginWithEmailOTPConfiguration) { - const { email, showUI, deviceCheckUI, variation } = configuration; + const { email, showUI, deviceCheckUI, overrides } = configuration; const requestPayload = createJsonRpcRequestPayload( this.sdk.testMode ? MagicPayloadMethod.LoginWithEmailOTPTestMode : MagicPayloadMethod.LoginWithEmailOTP, - [{ email, showUI, deviceCheckUI, variation }], + [{ email, showUI, deviceCheckUI, overrides }], ); const handle = this.request(requestPayload); if (!deviceCheckUI && handle) { diff --git a/packages/@magic-sdk/types/src/modules/auth-types.ts b/packages/@magic-sdk/types/src/modules/auth-types.ts index bfb9f312f..d1923f75d 100644 --- a/packages/@magic-sdk/types/src/modules/auth-types.ts +++ b/packages/@magic-sdk/types/src/modules/auth-types.ts @@ -24,7 +24,9 @@ export interface LoginWithMagicLinkConfiguration { * from their dashboard. The default Magic loginWithMagicLink email will be * overriden when a variation is passed here. */ - variation?: string; + overrides?: { + variation?: string; + }; } export interface LoginWithSmsConfiguration { @@ -67,7 +69,9 @@ export interface LoginWithEmailOTPConfiguration { * from their dashboard. The default Magic loginWithOTP email will be * overriden when a variation is passed here. */ - variation?: string; + overrides?: { + variation?: string; + }; } /**