Skip to content

Commit 1ce59ca

Browse files
committed
chore: add source parameter to CustomAuth
Made-with: Cursor
1 parent 0e671f0 commit 1ce59ca

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/login.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export class CustomAuth {
7474
serverTimeOffset = 0,
7575
nodeDetails,
7676
checkCommitment = true,
77+
source = "customauth",
7778
}: CustomAuthArgs) {
7879
if (!web3AuthClientId) throw new Error("Please provide a valid web3AuthClientId in constructor");
7980
if (!network) throw new Error("Please provide a valid network in constructor");
@@ -105,6 +106,7 @@ export class CustomAuth {
105106
legacyMetadataHost: metadataUrl,
106107
keyType,
107108
buildEnv,
109+
source,
108110
});
109111
Torus.setAPIKey(apiKey);
110112
this.torus = torus;

src/utils/interfaces.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,12 @@ export interface CustomAuthArgs {
247247
* @defaultValue true
248248
*/
249249
checkCommitment?: boolean;
250+
251+
/**
252+
* Source of the login
253+
* @defaultValue "customauth"
254+
*/
255+
source?: string;
250256
}
251257

252258
export interface InitParams {

0 commit comments

Comments
 (0)