Skip to content

Commit a99d0b9

Browse files
committed
change verifierIdField types to string
1 parent 58a9321 commit a99d0b9

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

src/handlers/interfaces.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -354,25 +354,10 @@ export interface Auth0ClientOptions extends BaseLoginOptions {
354354
* The Client ID found on your Application settings page
355355
*/
356356
client_id?: string;
357-
/**
358-
* The default URL where Auth0 will redirect your browser to with
359-
* the authentication result. It must be whitelisted in
360-
* the "Allowed Callback URLs" field in your Auth0 Application's
361-
* settings. If not provided here, it should be provided in the other
362-
* methods that provide authentication.
363-
*/
364-
redirect_uri?: string;
365-
/**
366-
* The value in seconds used to account for clock skew in JWT expirations.
367-
* Typically, this value is no more than a minute or two at maximum.
368-
* Defaults to 60s.
369-
*/
370-
leeway?: number;
371-
372357
/**
373358
* The field in jwt token which maps to verifier id
374359
*/
375-
verifierIdField?: keyof Auth0UserInfo;
360+
verifierIdField?: string;
376361

377362
/**
378363
* Whether the verifier id field is case sensitive

src/utils/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ function caseSensitiveField(field: string, isCaseSensitive?: boolean): string {
6060
export const getVerifierId = (
6161
userInfo: Auth0UserInfo,
6262
typeOfLogin: LOGIN_TYPE,
63-
verifierIdField?: keyof Auth0UserInfo,
63+
verifierIdField?: string,
6464
isVerifierIdCaseSensitive = true
6565
): string => {
6666
const { name, sub } = userInfo;
67-
if (verifierIdField) return caseSensitiveField(userInfo[verifierIdField], isVerifierIdCaseSensitive);
67+
if (verifierIdField) return caseSensitiveField(userInfo[verifierIdField as keyof Auth0UserInfo], isVerifierIdCaseSensitive);
6868
switch (typeOfLogin) {
6969
case LOGIN.PASSWORDLESS:
7070
case LOGIN.EMAIL_PASSWORD:

0 commit comments

Comments
 (0)