diff --git a/apps/customer/app/test/page.tsx b/apps/customer/app/test/page.tsx index 3bb47565..4dba8499 100644 --- a/apps/customer/app/test/page.tsx +++ b/apps/customer/app/test/page.tsx @@ -666,6 +666,18 @@ export default function Test() { + diff --git a/packages/sdk/src/client.ts b/packages/sdk/src/client.ts index 9a89b809..898c7447 100644 --- a/packages/sdk/src/client.ts +++ b/packages/sdk/src/client.ts @@ -178,6 +178,7 @@ export class MoneriumClient { signature: params?.signature, chain: params?.chain, state: params?.state, + email: params?.email, skip_create_account: params?.skipCreateAccount, skip_kyc: params?.skipKyc, }); diff --git a/packages/sdk/src/helpers/auth.helpers.ts b/packages/sdk/src/helpers/auth.helpers.ts index a5e0f1ba..274888b5 100644 --- a/packages/sdk/src/helpers/auth.helpers.ts +++ b/packages/sdk/src/helpers/auth.helpers.ts @@ -26,6 +26,7 @@ export const getAuthFlowParams = ( address, signature, chain, + email, skip_create_account, skip_kyc, } = args; @@ -42,6 +43,7 @@ export const getAuthFlowParams = ( client_id, redirect_uri, ...(scope !== undefined ? { scope: scope } : {}), + ...(email !== undefined ? { email: email } : {}), ...(state !== undefined ? { state: state } : {}), ...(skip_create_account !== undefined ? { skip_create_account: skip_create_account } diff --git a/packages/sdk/src/types.ts b/packages/sdk/src/types.ts index e905c9c6..5ffffe10 100644 --- a/packages/sdk/src/types.ts +++ b/packages/sdk/src/types.ts @@ -131,6 +131,8 @@ export type PKCERequest = { state?: string; /** the redirect uri of the application */ redirect_uri: string; + /** the email of the user to prefill the login form */ + email?: string; /** the scope of the application */ scope?: string; /** the address of the wallet to automatically link */ @@ -565,6 +567,8 @@ export interface AuthFlowOptions { clientId?: string; /** the redirect URI defined by your application */ redirectUri?: string; + /** the email of the user to prefill the login form */ + email?: string; /** the address your customer should link in auth flow */ address?: string; /** the signature of the address */