@okta/okta-auth-js 5.10.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/README.md +10 -6
- package/cjs/AuthStateManager.js +11 -3
- package/cjs/AuthStateManager.js.map +1 -1
- package/cjs/OktaAuth.js +139 -95
- package/cjs/OktaAuth.js.map +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/OktaUserAgent.js.map +1 -1
- package/cjs/PromiseQueue.js +11 -2
- package/cjs/PromiseQueue.js.map +1 -1
- package/cjs/SavedObject.js +4 -2
- package/cjs/SavedObject.js.map +1 -1
- package/cjs/StorageManager.js +16 -9
- package/cjs/StorageManager.js.map +1 -1
- package/cjs/TokenManager.js +38 -22
- package/cjs/TokenManager.js.map +1 -1
- package/cjs/TransactionManager.js +26 -7
- package/cjs/TransactionManager.js.map +1 -1
- package/cjs/browser/browserStorage.js +25 -14
- package/cjs/browser/browserStorage.js.map +1 -1
- package/cjs/browser/fingerprint.js +12 -4
- package/cjs/browser/fingerprint.js.map +1 -1
- package/cjs/builderUtil.js +7 -19
- package/cjs/builderUtil.js.map +1 -1
- package/cjs/clock.js +5 -1
- package/cjs/clock.js.map +1 -1
- package/cjs/crypto/base64.js +18 -0
- package/cjs/crypto/base64.js.map +1 -1
- package/cjs/crypto/index.js +6 -4
- package/cjs/crypto/index.js.map +1 -1
- package/cjs/crypto/oidcHash.js +5 -1
- package/cjs/crypto/oidcHash.js.map +1 -1
- package/cjs/crypto/webauthn.js +101 -0
- package/cjs/crypto/webauthn.js.map +1 -0
- package/cjs/crypto/webcrypto.js +3 -1
- package/cjs/crypto/webcrypto.js.map +1 -1
- package/cjs/errors/AuthApiError.js +1 -1
- package/cjs/errors/AuthPollStopError.js +1 -1
- package/cjs/errors/AuthSdkError.js +1 -1
- package/cjs/errors/CustomError.js +5 -1
- package/cjs/errors/CustomError.js.map +1 -1
- package/cjs/errors/OAuthError.js +1 -1
- package/cjs/errors/index.js +1 -1
- package/cjs/features.js +9 -3
- package/cjs/features.js.map +1 -1
- package/cjs/fetch/fetchRequest.js +19 -6
- package/cjs/fetch/fetchRequest.js.map +1 -1
- package/cjs/http/headers.js.map +1 -1
- package/cjs/http/index.js +4 -2
- package/cjs/http/index.js.map +1 -1
- package/cjs/http/request.js +11 -5
- package/cjs/http/request.js.map +1 -1
- package/cjs/idx/authenticate.js +8 -5
- package/cjs/idx/authenticate.js.map +1 -1
- package/cjs/idx/authenticator/Authenticator.js.map +1 -1
- package/cjs/idx/authenticator/OktaPassword.js.map +1 -1
- package/cjs/idx/authenticator/SecurityQuestionEnrollment.js +1 -1
- package/cjs/idx/authenticator/SecurityQuestionEnrollment.js.map +1 -1
- package/cjs/idx/authenticator/SecurityQuestionVerification.js +2 -1
- package/cjs/idx/authenticator/SecurityQuestionVerification.js.map +1 -1
- package/cjs/idx/authenticator/VerificationCodeAuthenticator.js +2 -2
- package/cjs/idx/authenticator/VerificationCodeAuthenticator.js.map +1 -1
- package/cjs/idx/authenticator/WebauthnEnrollment.js +46 -0
- package/cjs/idx/authenticator/WebauthnEnrollment.js.map +1 -0
- package/cjs/idx/authenticator/WebauthnVerification.js +55 -0
- package/cjs/idx/authenticator/WebauthnVerification.js.map +1 -0
- package/cjs/idx/authenticator/getAuthenticator.js +17 -6
- package/cjs/idx/authenticator/getAuthenticator.js.map +1 -1
- package/cjs/idx/authenticator/index.js +34 -6
- package/cjs/idx/authenticator/index.js.map +1 -1
- package/cjs/idx/cancel.js.map +1 -1
- package/cjs/idx/emailVerify.js +73 -0
- package/cjs/idx/emailVerify.js.map +1 -0
- package/cjs/idx/flow/AccountUnlockFlow.js +30 -0
- package/cjs/idx/flow/AccountUnlockFlow.js.map +1 -0
- package/cjs/idx/flow/AuthenticationFlow.js +2 -1
- package/cjs/idx/flow/AuthenticationFlow.js.map +1 -1
- package/cjs/idx/flow/FlowSpecification.js +24 -4
- package/cjs/idx/flow/FlowSpecification.js.map +1 -1
- package/cjs/idx/flow/PasswordRecoveryFlow.js +4 -1
- package/cjs/idx/flow/PasswordRecoveryFlow.js.map +1 -1
- package/cjs/idx/flow/RegistrationFlow.js +2 -0
- package/cjs/idx/flow/RegistrationFlow.js.map +1 -1
- package/cjs/idx/flow/index.js +20 -5
- package/cjs/idx/flow/index.js.map +1 -1
- package/cjs/idx/handleInteractionCodeRedirect.js +6 -1
- package/cjs/idx/handleInteractionCodeRedirect.js.map +1 -1
- package/cjs/idx/headers.js +21 -5
- package/cjs/idx/headers.js.map +1 -1
- package/cjs/idx/idx-js/client.js +91 -0
- package/cjs/idx/idx-js/client.js.map +1 -0
- package/cjs/idx/idx-js/index.js +162 -0
- package/cjs/idx/idx-js/index.js.map +1 -0
- package/cjs/idx/idx-js/interact.js +83 -0
- package/cjs/idx/idx-js/interact.js.map +1 -0
- package/cjs/idx/idx-js/introspect.js +58 -0
- package/cjs/idx/idx-js/introspect.js.map +1 -0
- package/cjs/idx/idx-js/parsers.js +41 -0
- package/cjs/idx/idx-js/parsers.js.map +1 -0
- package/cjs/idx/idx-js/util.js +34 -0
- package/cjs/idx/idx-js/util.js.map +1 -0
- package/cjs/idx/idx-js/v1/actionParser.js +90 -0
- package/cjs/idx/idx-js/v1/actionParser.js.map +1 -0
- package/cjs/idx/idx-js/v1/generateIdxAction.js +117 -0
- package/cjs/idx/idx-js/v1/generateIdxAction.js.map +1 -0
- package/cjs/idx/idx-js/v1/idxResponseParser.js +137 -0
- package/cjs/idx/idx-js/v1/idxResponseParser.js.map +1 -0
- package/cjs/idx/idx-js/v1/makeIdxState.js +64 -0
- package/cjs/idx/idx-js/v1/makeIdxState.js.map +1 -0
- package/cjs/idx/idx-js/v1/parsers.js +24 -0
- package/cjs/idx/idx-js/v1/parsers.js.map +1 -0
- package/cjs/idx/idx-js/v1/remediationParser.js +32 -0
- package/cjs/idx/idx-js/v1/remediationParser.js.map +1 -0
- package/cjs/idx/index.js +121 -109
- package/cjs/idx/index.js.map +1 -1
- package/cjs/idx/interact.js +53 -36
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js +17 -19
- package/cjs/idx/introspect.js.map +1 -1
- package/cjs/idx/poll.js +13 -3
- package/cjs/idx/poll.js.map +1 -1
- package/cjs/idx/proceed.js +4 -7
- package/cjs/idx/proceed.js.map +1 -1
- package/cjs/idx/recoverPassword.js +1 -1
- package/cjs/idx/recoverPassword.js.map +1 -1
- package/cjs/idx/register.js +11 -16
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/remediate.js +74 -27
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js +12 -4
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorVerificationData.js +13 -7
- package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js +31 -13
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js +67 -31
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js +46 -30
- package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js +16 -4
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengeAuthenticator.js +2 -2
- package/cjs/idx/remediators/ChallengeAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengePoll.js +2 -2
- package/cjs/idx/remediators/EnrollAuthenticator.js +2 -2
- package/cjs/idx/remediators/EnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/EnrollPoll.js +18 -9
- package/cjs/idx/remediators/EnrollPoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollProfile.js +24 -9
- package/cjs/idx/remediators/EnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/EnrollmentChannelData.js +96 -0
- package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -0
- package/cjs/idx/remediators/Identify.js +5 -3
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/remediators/ReEnrollAuthenticator.js +6 -3
- package/cjs/idx/remediators/ReEnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/RedirectIdp.js +2 -2
- package/cjs/idx/remediators/ResetAuthenticator.js +2 -2
- package/cjs/idx/remediators/ResetAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js +7 -5
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorEnroll.js +2 -2
- package/cjs/idx/remediators/SelectAuthenticatorEnroll.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js +72 -0
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -0
- package/cjs/idx/remediators/SelectEnrollProfile.js +2 -2
- package/cjs/idx/remediators/SelectEnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollmentChannel.js +86 -0
- package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -0
- package/cjs/idx/remediators/Skip.js +5 -3
- package/cjs/idx/remediators/Skip.js.map +1 -1
- package/cjs/idx/remediators/index.js +57 -16
- package/cjs/idx/remediators/index.js.map +1 -1
- package/cjs/idx/remediators/util.js +18 -3
- package/cjs/idx/remediators/util.js.map +1 -1
- package/cjs/idx/run.js +139 -49
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/startTransaction.js +4 -2
- package/cjs/idx/startTransaction.js.map +1 -1
- package/cjs/idx/transactionMeta.js +82 -69
- package/cjs/idx/transactionMeta.js.map +1 -1
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/types/index.js +59 -7
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/idx/unlockAccount.js +48 -0
- package/cjs/idx/unlockAccount.js.map +1 -0
- package/cjs/index.js +33 -13
- package/cjs/index.js.map +1 -1
- package/cjs/oidc/endpoints/authorize.js +10 -2
- package/cjs/oidc/endpoints/authorize.js.map +1 -1
- package/cjs/oidc/endpoints/index.js +5 -3
- package/cjs/oidc/endpoints/index.js.map +1 -1
- package/cjs/oidc/endpoints/token.js +16 -3
- package/cjs/oidc/endpoints/token.js.map +1 -1
- package/cjs/oidc/endpoints/well-known.js +7 -3
- package/cjs/oidc/endpoints/well-known.js.map +1 -1
- package/cjs/oidc/exchangeCodeForTokens.js +12 -4
- package/cjs/oidc/exchangeCodeForTokens.js.map +1 -1
- package/cjs/oidc/getToken.js +12 -6
- package/cjs/oidc/getToken.js.map +1 -1
- package/cjs/oidc/getUserInfo.js +7 -3
- package/cjs/oidc/getUserInfo.js.map +1 -1
- package/cjs/oidc/getWithPopup.js +8 -2
- package/cjs/oidc/getWithPopup.js.map +1 -1
- package/cjs/oidc/getWithRedirect.js +15 -38
- package/cjs/oidc/getWithRedirect.js.map +1 -1
- package/cjs/oidc/getWithoutPrompt.js +8 -2
- package/cjs/oidc/getWithoutPrompt.js.map +1 -1
- package/cjs/oidc/handleOAuthResponse.js +87 -87
- package/cjs/oidc/handleOAuthResponse.js.map +1 -1
- package/cjs/oidc/index.js +4 -2
- package/cjs/oidc/index.js.map +1 -1
- package/cjs/oidc/parseFromUrl.js +9 -3
- package/cjs/oidc/parseFromUrl.js.map +1 -1
- package/cjs/oidc/renewToken.js.map +1 -1
- package/cjs/oidc/renewTokens.js +6 -2
- package/cjs/oidc/renewTokens.js.map +1 -1
- package/cjs/oidc/renewTokensWithRefresh.js +5 -1
- package/cjs/oidc/renewTokensWithRefresh.js.map +1 -1
- package/cjs/oidc/revokeToken.js +34 -31
- package/cjs/oidc/revokeToken.js.map +1 -1
- package/cjs/oidc/util/browser.js +5 -1
- package/cjs/oidc/util/browser.js.map +1 -1
- package/cjs/oidc/util/defaultTokenParams.js.map +1 -1
- package/cjs/oidc/util/errors.js.map +1 -1
- package/cjs/oidc/util/index.js +27 -11
- package/cjs/oidc/util/index.js.map +1 -1
- package/cjs/oidc/util/loginRedirect.js +10 -1
- package/cjs/oidc/util/loginRedirect.js.map +1 -1
- package/cjs/oidc/util/oauth.js +4 -2
- package/cjs/oidc/util/oauth.js.map +1 -1
- package/cjs/oidc/util/oauthMeta.js +36 -0
- package/cjs/oidc/util/oauthMeta.js.map +1 -0
- package/cjs/oidc/util/pkce.js +11 -3
- package/cjs/oidc/util/pkce.js.map +1 -1
- package/cjs/oidc/util/prepareTokenParams.js +62 -39
- package/cjs/oidc/util/prepareTokenParams.js.map +1 -1
- package/cjs/oidc/util/validateClaims.js +3 -1
- package/cjs/oidc/util/validateClaims.js.map +1 -1
- package/cjs/oidc/verifyToken.js +13 -4
- package/cjs/oidc/verifyToken.js.map +1 -1
- package/cjs/options.js +12 -6
- package/cjs/options.js.map +1 -1
- package/cjs/server/serverStorage.js +2 -1
- package/cjs/server/serverStorage.js.map +1 -1
- package/cjs/services/TokenService.js +3 -0
- package/cjs/services/TokenService.js.map +1 -1
- package/cjs/tx/AuthTransaction.js +18 -9
- package/cjs/tx/AuthTransaction.js.map +1 -1
- package/cjs/tx/TransactionState.js +0 -17
- package/cjs/tx/TransactionState.js.map +1 -1
- package/cjs/tx/api.js +11 -6
- package/cjs/tx/api.js.map +1 -1
- package/cjs/tx/index.js +7 -5
- package/cjs/tx/index.js.map +1 -1
- package/cjs/tx/poll.js +6 -4
- package/cjs/tx/poll.js.map +1 -1
- package/cjs/tx/util.js +5 -1
- package/cjs/tx/util.js.map +1 -1
- package/cjs/types/Transaction.js +10 -2
- package/cjs/types/Transaction.js.map +1 -1
- package/cjs/types/index.js +16 -14
- package/cjs/types/index.js.map +1 -1
- package/cjs/util/index.js +7 -18
- package/cjs/util/index.js.map +1 -1
- package/cjs/util/misc.js +5 -1
- package/cjs/util/misc.js.map +1 -1
- package/cjs/util/object.js +16 -6
- package/cjs/util/object.js.map +1 -1
- package/cjs/util/sharedStorage.js +5 -1
- package/cjs/util/sharedStorage.js.map +1 -1
- package/cjs/util/url.js.map +1 -1
- package/dist/okta-auth-js.min.js +1 -1
- package/dist/okta-auth-js.min.js.LICENSE.txt +0 -12
- package/dist/okta-auth-js.min.js.map +1 -1
- package/dist/okta-auth-js.polyfill.js +1 -1
- package/dist/okta-auth-js.polyfill.js.map +1 -1
- package/dist/okta-auth-js.umd.js +1 -1
- package/dist/okta-auth-js.umd.js.LICENSE.txt +0 -12
- package/dist/okta-auth-js.umd.js.map +1 -1
- package/esm/index.js +2758 -957
- package/esm/index.js.map +1 -1
- package/lib/AuthStateManager.d.ts +1 -2
- package/lib/OktaAuth.d.ts +10 -13
- package/lib/StorageManager.d.ts +2 -2
- package/lib/TokenManager.d.ts +4 -4
- package/lib/TransactionManager.d.ts +4 -3
- package/lib/browser/fingerprint.d.ts +2 -3
- package/lib/builderUtil.d.ts +1 -2
- package/lib/crypto/base64.d.ts +2 -0
- package/lib/crypto/browser.d.ts +1 -1
- package/lib/crypto/webauthn.d.ts +25 -0
- package/lib/features.d.ts +1 -1
- package/lib/http/headers.d.ts +2 -2
- package/lib/http/request.d.ts +4 -4
- package/lib/idx/authenticate.d.ts +2 -2
- package/lib/idx/authenticator/Authenticator.d.ts +4 -5
- package/lib/idx/authenticator/OktaPassword.d.ts +7 -9
- package/lib/idx/authenticator/SecurityQuestionEnrollment.d.ts +9 -8
- package/lib/idx/authenticator/SecurityQuestionVerification.d.ts +7 -7
- package/lib/idx/authenticator/VerificationCodeAuthenticator.d.ts +6 -2
- package/lib/idx/authenticator/WebauthnEnrollment.d.ts +16 -0
- package/lib/idx/authenticator/WebauthnVerification.d.ts +17 -0
- package/lib/idx/authenticator/getAuthenticator.d.ts +1 -1
- package/lib/idx/authenticator/index.d.ts +9 -0
- package/lib/idx/cancel.d.ts +2 -2
- package/lib/idx/emailVerify.d.ts +26 -0
- package/lib/{util/emailVerify.d.ts → idx/flow/AccountUnlockFlow.d.ts} +2 -6
- package/lib/idx/flow/FlowSpecification.d.ts +3 -2
- package/lib/idx/flow/index.d.ts +1 -0
- package/lib/idx/headers.d.ts +3 -2
- package/lib/idx/idx-js/client.d.ts +36 -0
- package/lib/idx/idx-js/index.d.ts +51 -0
- package/lib/idx/idx-js/interact.d.ts +25 -0
- package/lib/idx/idx-js/introspect.d.ts +20 -0
- package/lib/idx/idx-js/parsers.d.ts +15 -0
- package/lib/idx/idx-js/util.d.ts +12 -0
- package/lib/idx/idx-js/v1/actionParser.d.ts +16 -0
- package/lib/idx/idx-js/v1/generateIdxAction.d.ts +13 -0
- package/lib/idx/idx-js/v1/idxResponseParser.d.ts +20 -0
- package/lib/idx/idx-js/v1/makeIdxState.d.ts +13 -0
- package/lib/idx/idx-js/v1/parsers.d.ts +16 -0
- package/lib/idx/idx-js/v1/remediationParser.d.ts +12 -0
- package/lib/idx/index.d.ts +12 -10
- package/lib/idx/interact.d.ts +7 -13
- package/lib/idx/introspect.d.ts +4 -3
- package/lib/idx/poll.d.ts +2 -2
- package/lib/idx/proceed.d.ts +8 -5
- package/lib/idx/recoverPassword.d.ts +2 -2
- package/lib/idx/register.d.ts +2 -2
- package/lib/idx/remediate.d.ts +10 -4
- package/lib/idx/remediators/AuthenticatorEnrollmentData.d.ts +3 -3
- package/lib/idx/remediators/AuthenticatorVerificationData.d.ts +3 -3
- package/lib/idx/remediators/Base/AuthenticatorData.d.ts +8 -7
- package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +10 -7
- package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +8 -12
- package/lib/idx/remediators/EnrollPoll.d.ts +1 -1
- package/lib/idx/remediators/EnrollProfile.d.ts +1 -1
- package/lib/idx/remediators/EnrollmentChannelData.d.ts +54 -0
- package/lib/idx/remediators/Identify.d.ts +2 -2
- package/lib/idx/remediators/ReEnrollAuthenticator.d.ts +2 -2
- package/lib/idx/remediators/RedirectIdp.d.ts +3 -3
- package/lib/idx/remediators/SelectAuthenticatorUnlockAccount.d.ts +38 -0
- package/lib/idx/remediators/SelectEnrollmentChannel.d.ts +40 -0
- package/lib/idx/remediators/index.d.ts +3 -0
- package/lib/idx/remediators/util.d.ts +2 -2
- package/lib/idx/run.d.ts +5 -3
- package/lib/idx/startTransaction.d.ts +3 -2
- package/lib/idx/transactionMeta.d.ts +10 -31
- package/lib/idx/types/FlowIdentifier.d.ts +1 -1
- package/lib/idx/types/idx-js.d.ts +44 -1
- package/lib/idx/types/index.d.ts +36 -9
- package/lib/idx/unlockAccount.d.ts +15 -0
- package/lib/index.d.ts +1 -0
- package/lib/oidc/endpoints/well-known.d.ts +3 -3
- package/lib/oidc/exchangeCodeForTokens.d.ts +14 -2
- package/lib/oidc/getToken.d.ts +2 -2
- package/lib/oidc/getWithPopup.d.ts +2 -2
- package/lib/oidc/getWithRedirect.d.ts +2 -2
- package/lib/oidc/getWithoutPrompt.d.ts +2 -2
- package/lib/oidc/handleOAuthResponse.d.ts +2 -2
- package/lib/oidc/parseFromUrl.d.ts +1 -1
- package/lib/oidc/renewToken.d.ts +2 -2
- package/lib/oidc/renewTokens.d.ts +1 -1
- package/lib/oidc/renewTokensWithRefresh.d.ts +2 -2
- package/lib/oidc/revokeToken.d.ts +2 -2
- package/lib/oidc/util/browser.d.ts +3 -3
- package/lib/oidc/util/defaultTokenParams.d.ts +2 -2
- package/lib/oidc/util/errors.d.ts +2 -2
- package/lib/oidc/util/index.d.ts +1 -0
- package/lib/oidc/util/loginRedirect.d.ts +4 -4
- package/lib/oidc/util/oauth.d.ts +4 -11
- package/lib/oidc/util/oauthMeta.d.ts +2 -0
- package/lib/oidc/util/prepareTokenParams.d.ts +5 -2
- package/lib/oidc/util/validateClaims.d.ts +2 -2
- package/lib/oidc/verifyToken.d.ts +2 -2
- package/lib/server/serverStorage.d.ts +1 -1
- package/lib/services/TokenService.d.ts +2 -2
- package/lib/tx/AuthTransaction.d.ts +2 -2
- package/lib/tx/TransactionState.d.ts +11 -1
- package/lib/tx/api.d.ts +6 -6
- package/lib/types/OktaAuthOptions.d.ts +6 -8
- package/lib/types/Storage.d.ts +3 -3
- package/lib/types/Transaction.d.ts +10 -7
- package/lib/types/UserClaims.d.ts +3 -3
- package/lib/types/api.d.ts +44 -20
- package/lib/types/index.d.ts +0 -1
- package/lib/util/console.d.ts +1 -1
- package/lib/util/index.d.ts +0 -1
- package/lib/util/sharedStorage.d.ts +1 -1
- package/lib/util/types.d.ts +1 -1
- package/lib/util/url.d.ts +2 -2
- package/package.json +10 -7
- package/polyfill/index.js +1 -0
- package/cjs/util/emailVerify.js +0 -28
- package/cjs/util/emailVerify.js.map +0 -1
package/lib/types/Storage.d.ts
CHANGED
|
@@ -49,13 +49,13 @@ export interface StorageOptions extends CookieOptions {
|
|
|
49
49
|
storageTypes?: StorageType[];
|
|
50
50
|
storageProvider?: SimpleStorage;
|
|
51
51
|
storageKey?: string;
|
|
52
|
-
|
|
52
|
+
useSeparateCookies?: boolean;
|
|
53
53
|
}
|
|
54
54
|
export declare type StorageType = 'memory' | 'sessionStorage' | 'localStorage' | 'cookie' | 'custom' | 'auto';
|
|
55
55
|
export interface StorageUtil {
|
|
56
56
|
storage: TxStorage;
|
|
57
57
|
testStorageType(storageType: StorageType): boolean;
|
|
58
|
-
getStorageByType(storageType: StorageType, options
|
|
58
|
+
getStorageByType(storageType: StorageType, options?: StorageOptions): SimpleStorage;
|
|
59
59
|
findStorageType(types: StorageType[]): StorageType;
|
|
60
60
|
}
|
|
61
61
|
export interface BrowserStorageUtil extends StorageUtil {
|
|
@@ -79,7 +79,7 @@ export interface NodeStorageUtil extends StorageUtil {
|
|
|
79
79
|
getStorage(): SimpleStorage;
|
|
80
80
|
}
|
|
81
81
|
export interface CookieStorage extends SimpleStorage {
|
|
82
|
-
setItem(key: string, value: any, expiresAt?: string): void;
|
|
82
|
+
setItem(key: string, value: any, expiresAt?: string | null): void;
|
|
83
83
|
getItem(key?: string): any;
|
|
84
84
|
removeItem(key: string): any;
|
|
85
85
|
}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import StorageManager from '../StorageManager';
|
|
12
|
+
import { StorageManager } from '../StorageManager';
|
|
13
13
|
import { CustomUrls } from './OktaAuthOptions';
|
|
14
|
-
import { FlowIdentifier } from '../idx/types';
|
|
14
|
+
import { FlowIdentifier, IdxTransactionMeta } from '../idx/types';
|
|
15
15
|
export interface TransactionManagerOptions {
|
|
16
16
|
storageManager?: StorageManager;
|
|
17
17
|
enableSharedStorage?: boolean;
|
|
@@ -19,12 +19,19 @@ export interface TransactionManagerOptions {
|
|
|
19
19
|
saveNonceCookie?: boolean;
|
|
20
20
|
saveStateCookie?: boolean;
|
|
21
21
|
saveParamsCookie?: boolean;
|
|
22
|
+
saveLastResponse?: boolean;
|
|
22
23
|
}
|
|
23
24
|
export interface TransactionMetaOptions {
|
|
24
25
|
pkce?: boolean;
|
|
25
26
|
oauth?: boolean;
|
|
26
27
|
muteWarning?: boolean;
|
|
27
28
|
state?: string;
|
|
29
|
+
flow?: FlowIdentifier;
|
|
30
|
+
codeVerifier?: string;
|
|
31
|
+
codeChallenge?: string;
|
|
32
|
+
codeChallengeMethod?: string;
|
|
33
|
+
activationToken?: string;
|
|
34
|
+
recoveryToken?: string;
|
|
28
35
|
}
|
|
29
36
|
export interface OAuthTransactionMeta {
|
|
30
37
|
issuer: string;
|
|
@@ -32,6 +39,7 @@ export interface OAuthTransactionMeta {
|
|
|
32
39
|
state: string;
|
|
33
40
|
nonce: string;
|
|
34
41
|
responseType: string | string[];
|
|
42
|
+
responseMode?: string;
|
|
35
43
|
scopes: string[];
|
|
36
44
|
clientId: string;
|
|
37
45
|
urls: CustomUrls;
|
|
@@ -43,11 +51,6 @@ export interface PKCETransactionMeta extends OAuthTransactionMeta {
|
|
|
43
51
|
codeChallengeMethod: string;
|
|
44
52
|
codeChallenge: string;
|
|
45
53
|
}
|
|
46
|
-
export interface IdxTransactionMeta extends PKCETransactionMeta {
|
|
47
|
-
interactionHandle?: string;
|
|
48
|
-
remediations?: string[];
|
|
49
|
-
flow?: FlowIdentifier;
|
|
50
|
-
}
|
|
51
54
|
export declare type CustomAuthTransactionMeta = Record<string, string | undefined>;
|
|
52
55
|
export declare type TransactionMeta = IdxTransactionMeta | PKCETransactionMeta | OAuthTransactionMeta | CustomAuthTransactionMeta;
|
|
53
56
|
export declare function isOAuthTransactionMeta(obj: any): obj is OAuthTransactionMeta;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* ID Token or returned from the /userinfo response and depend on the
|
|
16
16
|
* response_type and scope parameters in the authorize request
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export declare type UserClaims<T = {}> = T & {
|
|
19
19
|
auth_time?: number;
|
|
20
20
|
aud?: string;
|
|
21
21
|
email?: string;
|
|
@@ -34,5 +34,5 @@ export interface UserClaims {
|
|
|
34
34
|
updated_at?: number;
|
|
35
35
|
ver?: number;
|
|
36
36
|
zoneinfo?: string;
|
|
37
|
-
|
|
38
|
-
}
|
|
37
|
+
at_hash?: string;
|
|
38
|
+
};
|
package/lib/types/api.d.ts
CHANGED
|
@@ -14,27 +14,26 @@ import { Token, Tokens, RevocableToken, AccessToken, IDToken, RefreshToken } fro
|
|
|
14
14
|
import { JWTObject } from './JWT';
|
|
15
15
|
import { UserClaims } from './UserClaims';
|
|
16
16
|
import { CustomUrls, OktaAuthOptions } from './OktaAuthOptions';
|
|
17
|
-
import StorageManager from '../StorageManager';
|
|
17
|
+
import { StorageManager } from '../StorageManager';
|
|
18
18
|
import TransactionManager from '../TransactionManager';
|
|
19
19
|
import { TokenManagerInterface } from './TokenManager';
|
|
20
20
|
import { OktaUserAgent } from '../OktaUserAgent';
|
|
21
|
-
import { FlowIdentifier, IdxPollOptions } from '../idx/types';
|
|
22
|
-
import { AuthenticationOptions, RegistrationOptions as IdxRegistrationOptions, PasswordRecoveryOptions, ProceedOptions, CancelOptions, IdxOptions, IdxTransaction } from '../idx/types';
|
|
21
|
+
import { AuthenticationOptions, RegistrationOptions as IdxRegistrationOptions, PasswordRecoveryOptions, AccountUnlockOptions, ProceedOptions, CancelOptions, IdxOptions, IdxTransaction, IdxTransactionMeta, EmailVerifyCallbackResponse, IdxAuthenticator, ChallengeData, ActivationData, WebauthnEnrollValues, WebauthnVerificationValues, FlowIdentifier, IdxPollOptions } from '../idx/types';
|
|
23
22
|
import { InteractOptions, InteractResponse } from '../idx/interact';
|
|
24
23
|
import { IntrospectOptions } from '../idx/introspect';
|
|
25
24
|
import { IdxResponse } from '../idx/types/idx-js';
|
|
26
|
-
|
|
25
|
+
import { TransactionMetaOptions } from './Transaction';
|
|
26
|
+
export interface OktaAuthInterface {
|
|
27
27
|
options: OktaAuthOptions;
|
|
28
|
-
userAgent: string;
|
|
29
28
|
getIssuerOrigin(): string;
|
|
30
|
-
getOriginalUri(): string;
|
|
29
|
+
getOriginalUri(): string | undefined;
|
|
31
30
|
_oktaUserAgent: OktaUserAgent;
|
|
32
31
|
storageManager: StorageManager;
|
|
33
32
|
transactionManager: TransactionManager;
|
|
34
33
|
tokenManager: TokenManagerInterface;
|
|
35
34
|
idx: IdxAPI;
|
|
36
|
-
features
|
|
37
|
-
token
|
|
35
|
+
features: FeaturesAPI;
|
|
36
|
+
token: TokenAPI;
|
|
38
37
|
}
|
|
39
38
|
export interface APIError {
|
|
40
39
|
errorSummary: string;
|
|
@@ -83,11 +82,10 @@ export interface TokenParams extends CustomUrls {
|
|
|
83
82
|
scopes?: string[];
|
|
84
83
|
display?: string;
|
|
85
84
|
ignoreSignature?: boolean;
|
|
86
|
-
codeChallengeMethod?: string;
|
|
87
85
|
codeVerifier?: string;
|
|
88
86
|
authorizationCode?: string;
|
|
89
87
|
codeChallenge?: string;
|
|
90
|
-
|
|
88
|
+
codeChallengeMethod?: string;
|
|
91
89
|
interactionCode?: string;
|
|
92
90
|
idp?: string;
|
|
93
91
|
idpScope?: string | string[];
|
|
@@ -136,8 +134,8 @@ export interface TokenAPI extends BaseTokenAPI {
|
|
|
136
134
|
getWithoutPrompt(params?: TokenParams): Promise<TokenResponse>;
|
|
137
135
|
getWithPopup(params?: TokenParams): Promise<TokenResponse>;
|
|
138
136
|
revoke(token: RevocableToken): Promise<object>;
|
|
139
|
-
renew(token: Token): Promise<Token>;
|
|
140
|
-
renewTokens(): Promise<Tokens>;
|
|
137
|
+
renew(token: Token): Promise<Token | undefined>;
|
|
138
|
+
renewTokens(options?: TokenParams): Promise<Tokens>;
|
|
141
139
|
renewTokensWithRefresh(tokenParams: TokenParams, refreshTokenObject: RefreshToken): Promise<Tokens>;
|
|
142
140
|
verify(token: IDToken, params?: object): Promise<IDToken>;
|
|
143
141
|
isLoginRedirect(): boolean;
|
|
@@ -163,12 +161,24 @@ export interface FeaturesAPI {
|
|
|
163
161
|
isPKCESupported(): boolean;
|
|
164
162
|
isIE11OrLess(): boolean;
|
|
165
163
|
}
|
|
164
|
+
export interface CryptoAPI {
|
|
165
|
+
base64UrlToBuffer(b64u: string): Uint8Array;
|
|
166
|
+
bufferToBase64Url(bin: Uint8Array): string;
|
|
167
|
+
}
|
|
168
|
+
export interface WebauthnAPI {
|
|
169
|
+
getAssertion(credential: PublicKeyCredential): WebauthnVerificationValues;
|
|
170
|
+
getAttestation(credential: PublicKeyCredential): WebauthnEnrollValues;
|
|
171
|
+
buildCredentialRequestOptions(challengeData: ChallengeData, authenticatorEnrollments: IdxAuthenticator[]): CredentialRequestOptions;
|
|
172
|
+
buildCredentialCreationOptions(activationData: ActivationData, authenticatorEnrollments: IdxAuthenticator[]): CredentialCreationOptions;
|
|
173
|
+
}
|
|
166
174
|
export interface SupportsCodeFlow {
|
|
167
175
|
useInteractionCodeFlow?: boolean;
|
|
168
176
|
}
|
|
169
177
|
export interface SigninOptions extends SupportsCodeFlow, AuthenticationOptions {
|
|
170
178
|
relayState?: string;
|
|
171
|
-
context?:
|
|
179
|
+
context?: {
|
|
180
|
+
deviceToken?: string;
|
|
181
|
+
};
|
|
172
182
|
sendFingerprint?: boolean;
|
|
173
183
|
}
|
|
174
184
|
export interface SigninWithRedirectOptions extends SigninOptions, TokenParams {
|
|
@@ -192,7 +202,7 @@ export interface SignoutOptions extends SignoutRedirectUrlOptions {
|
|
|
192
202
|
revokeRefreshToken?: boolean;
|
|
193
203
|
accessToken?: AccessToken;
|
|
194
204
|
refreshToken?: RefreshToken;
|
|
195
|
-
|
|
205
|
+
clearTokensBeforeRedirect?: boolean;
|
|
196
206
|
}
|
|
197
207
|
export interface SignoutAPI {
|
|
198
208
|
signOut(opts: SignoutOptions): any;
|
|
@@ -215,15 +225,29 @@ export interface IdxAPI {
|
|
|
215
225
|
introspect: (options?: IntrospectOptions) => Promise<IdxResponse>;
|
|
216
226
|
authenticate: (options?: AuthenticationOptions) => Promise<IdxTransaction>;
|
|
217
227
|
register: (options?: IdxRegistrationOptions) => Promise<IdxTransaction>;
|
|
228
|
+
recoverPassword: (options?: PasswordRecoveryOptions) => Promise<IdxTransaction>;
|
|
229
|
+
unlockAccount: (options?: AccountUnlockOptions) => Promise<IdxTransaction>;
|
|
218
230
|
poll: (options?: IdxPollOptions) => Promise<IdxTransaction>;
|
|
231
|
+
start: (options?: IdxOptions) => Promise<IdxTransaction>;
|
|
232
|
+
canProceed(options?: {
|
|
233
|
+
state?: string;
|
|
234
|
+
}): boolean;
|
|
219
235
|
proceed: (options?: ProceedOptions) => Promise<IdxTransaction>;
|
|
220
236
|
cancel: (options?: CancelOptions) => Promise<IdxTransaction>;
|
|
237
|
+
getFlow(): FlowIdentifier | undefined;
|
|
238
|
+
setFlow(flow: FlowIdentifier): void;
|
|
221
239
|
startTransaction: (options?: IdxOptions) => Promise<IdxTransaction>;
|
|
222
|
-
|
|
240
|
+
isInteractionRequired: (hashOrSearch?: string) => boolean;
|
|
241
|
+
isInteractionRequiredError: (error: Error) => boolean;
|
|
223
242
|
handleInteractionCodeRedirect: (url: string) => Promise<void>;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
243
|
+
isEmailVerifyCallback: (search: string) => boolean;
|
|
244
|
+
parseEmailVerifyCallback: (search: string) => EmailVerifyCallbackResponse;
|
|
245
|
+
handleEmailVerifyCallback: (search: string) => Promise<IdxTransaction | undefined>;
|
|
246
|
+
isEmailVerifyCallbackError: (error: Error) => boolean;
|
|
247
|
+
getSavedTransactionMeta: (options?: TransactionMetaOptions) => IdxTransactionMeta | undefined;
|
|
248
|
+
createTransactionMeta: (options?: TransactionMetaOptions) => Promise<IdxTransactionMeta>;
|
|
249
|
+
getTransactionMeta: (options?: TransactionMetaOptions) => Promise<IdxTransactionMeta>;
|
|
250
|
+
saveTransactionMeta: (meta: unknown) => void;
|
|
251
|
+
clearTransactionMeta: () => void;
|
|
252
|
+
isTransactionMetaValid: (meta: unknown) => boolean;
|
|
229
253
|
}
|
package/lib/types/index.d.ts
CHANGED
package/lib/util/console.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
export declare function getNativeConsole(): Console;
|
|
12
|
+
export declare function getNativeConsole(): Console | undefined;
|
|
13
13
|
export declare function getConsole(): Console | {
|
|
14
14
|
log: () => void;
|
|
15
15
|
warn: () => void;
|
package/lib/util/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransactionMeta } from '../types';
|
|
2
|
-
import StorageManager from '../StorageManager';
|
|
2
|
+
import { StorageManager } from '../StorageManager';
|
|
3
3
|
export declare function pruneSharedStorage(storageManager: StorageManager): void;
|
|
4
4
|
export declare function saveTransactionToSharedStorage(storageManager: StorageManager, state: string, meta: TransactionMeta): void;
|
|
5
5
|
export declare function loadTransactionFromSharedStorage(storageManager: StorageManager, state: string): any;
|
package/lib/util/types.d.ts
CHANGED
|
@@ -13,4 +13,4 @@ export declare function isString(obj: any): obj is string;
|
|
|
13
13
|
export declare function isObject(obj: any): obj is object;
|
|
14
14
|
export declare function isNumber(obj: any): obj is number;
|
|
15
15
|
export declare function isFunction(fn: any): fn is Function;
|
|
16
|
-
export declare function isPromise(obj: any):
|
|
16
|
+
export declare function isPromise(obj: any): any;
|
package/lib/util/url.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
export declare function isAbsoluteUrl(url: any): boolean;
|
|
13
|
-
export declare function toAbsoluteUrl(url: string, baseUrl: any): string;
|
|
14
|
-
export declare function toRelativeUrl(url: string, baseUrl: any): string;
|
|
13
|
+
export declare function toAbsoluteUrl(url: string | undefined, baseUrl: any): string;
|
|
14
|
+
export declare function toRelativeUrl(url: string | undefined, baseUrl: any): string;
|
|
15
15
|
export declare function toQueryString(obj: any): string;
|
|
16
16
|
export declare function removeTrailingSlash(path: any): any;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@okta/okta-auth-js",
|
|
4
4
|
"description": "The Okta Auth SDK",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "6.1.0",
|
|
6
6
|
"homepage": "https://github.com/okta/okta-auth-js",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"main": "cjs/index.js",
|
|
@@ -70,14 +70,15 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@babel/runtime": "^7.12.5",
|
|
73
|
-
"@
|
|
73
|
+
"@babel/runtime-corejs3": "^7.17.0",
|
|
74
74
|
"@peculiar/webcrypto": "1.1.6",
|
|
75
75
|
"Base64": "1.1.0",
|
|
76
76
|
"atob": "^2.1.2",
|
|
77
77
|
"btoa": "^1.2.1",
|
|
78
78
|
"core-js": "^3.6.5",
|
|
79
|
-
"cross-fetch": "^3.
|
|
79
|
+
"cross-fetch": "^3.1.5",
|
|
80
80
|
"js-cookie": "2.2.1",
|
|
81
|
+
"jsonpath-plus": "^6.0.1",
|
|
81
82
|
"node-cache": "^5.1.2",
|
|
82
83
|
"p-cancelable": "^2.0.0",
|
|
83
84
|
"text-encoding": "^0.7.0",
|
|
@@ -94,7 +95,7 @@
|
|
|
94
95
|
"@babel/plugin-transform-typescript": "^7.10.5",
|
|
95
96
|
"@babel/preset-env": "^7.8.2",
|
|
96
97
|
"@babel/preset-typescript": "^7.10.4",
|
|
97
|
-
"@okta/okta-signin-widget": "
|
|
98
|
+
"@okta/okta-signin-widget": "6.0.0",
|
|
98
99
|
"@rollup/plugin-alias": "^3.1.8",
|
|
99
100
|
"@rollup/plugin-babel": "^5.3.0",
|
|
100
101
|
"@rollup/plugin-replace": "^3.0.0",
|
|
@@ -109,7 +110,9 @@
|
|
|
109
110
|
"chalk": "2.4.2",
|
|
110
111
|
"cross-env": "^5.1.1",
|
|
111
112
|
"eslint": "^7.1.0",
|
|
113
|
+
"eslint-import-resolver-typescript": "^2.5.0",
|
|
112
114
|
"eslint-plugin-compat": "^3.3.0",
|
|
115
|
+
"eslint-plugin-import": "^2.25.4",
|
|
113
116
|
"eslint-plugin-jasmine": "^2.10.1",
|
|
114
117
|
"eslint-plugin-jsdoc": "^25.4.2",
|
|
115
118
|
"eslint-plugin-node": "^11.1.0",
|
|
@@ -169,8 +172,8 @@
|
|
|
169
172
|
}
|
|
170
173
|
},
|
|
171
174
|
"okta": {
|
|
172
|
-
"commitSha": "
|
|
173
|
-
"fullVersion": "
|
|
174
|
-
"testedSha": "
|
|
175
|
+
"commitSha": "1478c1930c4034d0033f5af740dc996cbe58ceb5",
|
|
176
|
+
"fullVersion": "6.1.0-g1478c19",
|
|
177
|
+
"testedSha": "fe1efe5ae03fe0fce892e1f2738f6fa3fa448c5a"
|
|
175
178
|
}
|
|
176
179
|
}
|
package/polyfill/index.js
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
// Polyfills objects needed to support IE 11+
|
|
15
15
|
require('core-js/features/object/assign');
|
|
16
16
|
require('core-js/features/object/values');
|
|
17
|
+
require('core-js/features/object/from-entries');
|
|
17
18
|
require('core-js/es/promise');
|
|
18
19
|
require('core-js/es/typed-array/uint8-array');
|
|
19
20
|
require('core-js/features/array/from');
|
package/cjs/util/emailVerify.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.isEmailVerifyCallback = isEmailVerifyCallback;
|
|
4
|
-
exports.parseEmailVerifyCallback = parseEmailVerifyCallback;
|
|
5
|
-
|
|
6
|
-
var _urlParams = require("../oidc/util/urlParams");
|
|
7
|
-
|
|
8
|
-
/*!
|
|
9
|
-
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
10
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
11
|
-
*
|
|
12
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
15
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
*
|
|
17
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
18
|
-
*/
|
|
19
|
-
// Check if state && stateTokenExternalId have been passed back in the url
|
|
20
|
-
function isEmailVerifyCallback(urlPath) {
|
|
21
|
-
return /(stateTokenExternalId=)/i.test(urlPath) && /(state=)/i.test(urlPath);
|
|
22
|
-
} // Parse state and stateTokenExternalId from a urlPath (should be either a search or fragment from the URL)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
function parseEmailVerifyCallback(urlPath) {
|
|
26
|
-
return (0, _urlParams.urlParamsToObject)(urlPath);
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=emailVerify.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/util/emailVerify.ts"],"names":["isEmailVerifyCallback","urlPath","test","parseEmailVerifyCallback"],"mappings":";;;;;AAaA;;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACO,SAASA,qBAAT,CAAgCC,OAAhC,EAA0D;AAC/D,SAAO,2BAA2BC,IAA3B,CAAgCD,OAAhC,KAA4C,YAAYC,IAAZ,CAAiBD,OAAjB,CAAnD;AACD,C,CAED;;;AACO,SAASE,wBAAT,CAAkCF,OAAlC,EAAgF;AACrF,SAAO,kCAAkBA,OAAlB,CAAP;AACD","sourcesContent":["\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { urlParamsToObject } from '../oidc/util/urlParams';\n\nexport interface EmailVerifyCallbackResponse {\n state: string;\n stateTokenExternalId: string;\n}\n\n// Check if state && stateTokenExternalId have been passed back in the url\nexport function isEmailVerifyCallback (urlPath: string): boolean {\n return /(stateTokenExternalId=)/i.test(urlPath) && /(state=)/i.test(urlPath);\n}\n\n// Parse state and stateTokenExternalId from a urlPath (should be either a search or fragment from the URL)\nexport function parseEmailVerifyCallback(urlPath: string): EmailVerifyCallbackResponse {\n return urlParamsToObject(urlPath) as EmailVerifyCallbackResponse;\n}\n"],"file":"emailVerify.js"}
|