Skip to content

Commit ad21d2d

Browse files
committed
feat: update Allow requests
1 parent 0ccfacb commit ad21d2d

3 files changed

Lines changed: 4 additions & 17 deletions

File tree

src/helpers/citadelUtils.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ export interface CitadelAllowParams {
1111
clientId: string;
1212
recordId: string;
1313
source?: string;
14-
torusLoginInitiated?: boolean;
15-
torusLoginSuccess?: boolean;
16-
torusLoginFailed?: boolean;
1714
}
1815

1916
export interface CitadelAuthFlowAuditParams {
@@ -29,7 +26,7 @@ export interface CitadelAuditParams extends CitadelAuthFlowAuditParams {
2926
authConnection: string;
3027
authConnectionId: string;
3128
groupedAuthConnectionId: string;
32-
oauthUserId: string;
29+
oAuthUserId: string;
3330
web3AuthNetwork: string;
3431
web3AuthClientId: string;
3532
}
@@ -44,15 +41,6 @@ export function buildAllowUrl(params: CitadelAllowParams): string {
4441
if (params.source) {
4542
url.searchParams.set("source", params.source);
4643
}
47-
if (typeof params.torusLoginInitiated !== "undefined") {
48-
url.searchParams.set("toruslogininitiated", params.torusLoginInitiated.toString());
49-
}
50-
if (typeof params.torusLoginSuccess !== "undefined") {
51-
url.searchParams.set("torusloginsuccess", params.torusLoginSuccess.toString());
52-
}
53-
if (typeof params.torusLoginFailed !== "undefined") {
54-
url.searchParams.set("torusloginfailed", params.torusLoginFailed.toString());
55-
}
5644
return url.toString();
5745
}
5846

@@ -68,7 +56,7 @@ export function buildAuditPayload(
6856
authConnection: params.authConnection || "",
6957
authConnectionId: params.verifierParams.sub_verifier_ids?.[0] || "",
7058
groupedAuthConnectionId: params.verifier || "",
71-
oauthUserId: params.verifierParams.verifier_id || "",
59+
oAuthUserId: params.verifierParams.verifier_id || "",
7260
web3AuthNetwork: network,
7361
web3AuthClientId: clientId,
7462
};

src/helpers/nodeUtils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ export async function retrieveOrImportShare(params: {
398398
clientId,
399399
source,
400400
recordId,
401-
torusLoginInitiated: true,
402401
});
403402

404403
// generate temporary private and public key that is used to secure receive shares

src/torus.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@ class Torus {
199199
// report oauth verified, we won't await this call as it's only for analytics tracking
200200
this.reportUserAuthFlowAudit({ ...params, recordId }, { oauthVerified: true });
201201
} catch (error) {
202-
this.reportSignerAllow({ ...allowParams, torusLoginFailed: true });
202+
this.reportSignerAllow(allowParams);
203203
// report oauth verification failed, we won't await this call as it's only for analytics tracking
204204
this.reportUserAuthFlowAudit({ ...params, recordId }, { oauthVerificationFailed: true });
205205
throw error;
206206
}
207207

208-
this.reportSignerAllow({ ...allowParams, torusLoginSuccess: true });
208+
this.reportSignerAllow(allowParams);
209209
return result;
210210
}
211211

0 commit comments

Comments
 (0)