@okta/okta-auth-js 6.6.1 → 6.7.1
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 +28 -1
- package/README.md +20 -5
- package/cjs/AuthStateManager.js +6 -6
- package/cjs/AuthStateManager.js.map +1 -1
- package/cjs/OktaAuth.js +17 -7
- package/cjs/OktaAuth.js.map +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/OktaUserAgent.js.map +1 -1
- package/cjs/PromiseQueue.js.map +1 -1
- package/cjs/SavedObject.js +6 -0
- package/cjs/SavedObject.js.map +1 -1
- package/cjs/ServiceManager.js +44 -68
- package/cjs/ServiceManager.js.map +1 -1
- package/cjs/StorageManager.js.map +1 -1
- package/cjs/TokenManager.js +63 -65
- package/cjs/TokenManager.js.map +1 -1
- package/cjs/TransactionManager.js.map +1 -1
- package/cjs/browser/browserStorage.js +13 -3
- package/cjs/browser/browserStorage.js.map +1 -1
- package/cjs/browser/fingerprint.js.map +1 -1
- package/cjs/builderUtil.js.map +1 -1
- package/cjs/cdnEntry.js +52 -0
- package/cjs/cdnEntry.js.map +1 -0
- package/cjs/clock.js.map +1 -1
- package/cjs/constants.js.map +1 -1
- package/cjs/crypto/base64.js.map +1 -1
- package/cjs/crypto/browser.js.map +1 -1
- package/cjs/crypto/index.js.map +1 -1
- package/cjs/crypto/node.js.map +1 -1
- package/cjs/crypto/oidcHash.js.map +1 -1
- package/cjs/crypto/verifyToken.js.map +1 -1
- package/cjs/crypto/webauthn.js.map +1 -1
- package/cjs/crypto/webcrypto.js.map +1 -1
- package/cjs/errors/AuthApiError.js +5 -1
- package/cjs/errors/AuthApiError.js.map +1 -1
- package/cjs/errors/AuthPollStopError.js.map +1 -1
- package/cjs/errors/AuthSdkError.js.map +1 -1
- package/cjs/errors/CustomError.js.map +1 -1
- package/cjs/errors/OAuthError.js.map +1 -1
- package/cjs/errors/index.js.map +1 -1
- package/cjs/features.js.map +1 -1
- package/cjs/fetch/fetchRequest.js.map +1 -1
- package/cjs/http/headers.js.map +1 -1
- package/cjs/http/index.js.map +1 -1
- package/cjs/http/request.js +14 -1
- package/cjs/http/request.js.map +1 -1
- 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/OktaVerifyTotp.js.map +1 -1
- package/cjs/idx/authenticator/SecurityQuestionEnrollment.js.map +1 -1
- package/cjs/idx/authenticator/SecurityQuestionVerification.js.map +1 -1
- package/cjs/idx/authenticator/VerificationCodeAuthenticator.js.map +1 -1
- package/cjs/idx/authenticator/WebauthnEnrollment.js.map +1 -1
- package/cjs/idx/authenticator/WebauthnVerification.js.map +1 -1
- package/cjs/idx/authenticator/getAuthenticator.js.map +1 -1
- package/cjs/idx/authenticator/index.js.map +1 -1
- package/cjs/idx/authenticator/util.js.map +1 -1
- package/cjs/idx/cancel.js.map +1 -1
- package/cjs/idx/emailVerify.js.map +1 -1
- package/cjs/idx/flow/AccountUnlockFlow.js.map +1 -1
- package/cjs/idx/flow/AuthenticationFlow.js.map +1 -1
- package/cjs/idx/flow/FlowSpecification.js.map +1 -1
- package/cjs/idx/flow/PasswordRecoveryFlow.js.map +1 -1
- package/cjs/idx/flow/RegistrationFlow.js.map +1 -1
- package/cjs/idx/flow/RemediationFlow.js.map +1 -1
- package/cjs/idx/flow/index.js.map +1 -1
- package/cjs/idx/handleInteractionCodeRedirect.js.map +1 -1
- package/cjs/idx/idxState/index.js.map +1 -1
- package/cjs/idx/idxState/v1/actionParser.js.map +1 -1
- package/cjs/idx/idxState/v1/generateIdxAction.js.map +1 -1
- package/cjs/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/cjs/idx/idxState/v1/makeIdxState.js.map +1 -1
- package/cjs/idx/idxState/v1/parsers.js.map +1 -1
- package/cjs/idx/idxState/v1/remediationParser.js.map +1 -1
- package/cjs/idx/index.js.map +1 -1
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js.map +1 -1
- package/cjs/idx/poll.js.map +1 -1
- package/cjs/idx/proceed.js.map +1 -1
- package/cjs/idx/recoverPassword.js.map +1 -1
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/remediate.js +7 -11
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengeAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengePoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/EnrollPoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js +25 -12
- package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/index.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/util.js +20 -6
- package/cjs/idx/remediators/GenericRemediator/util.js.map +1 -1
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/remediators/ReEnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/RedirectIdp.js.map +1 -1
- package/cjs/idx/remediators/ResetAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorEnroll.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
- package/cjs/idx/remediators/Skip.js.map +1 -1
- package/cjs/idx/remediators/index.js.map +1 -1
- package/cjs/idx/remediators/util.js.map +1 -1
- package/cjs/idx/run.js +1 -1
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/startTransaction.js.map +1 -1
- package/cjs/idx/transactionMeta.js.map +1 -1
- package/cjs/idx/types/FlowIdentifier.js.map +1 -1
- package/cjs/idx/types/api.js.map +1 -1
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/idx/types/options.js.map +1 -1
- package/cjs/idx/unlockAccount.js.map +1 -1
- package/cjs/idx/util.js +55 -26
- package/cjs/idx/util.js.map +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/myaccount/api.js +43 -0
- package/cjs/myaccount/api.js.map +1 -0
- package/cjs/myaccount/emailApi.js +144 -0
- package/cjs/myaccount/emailApi.js.map +1 -0
- package/cjs/myaccount/index.js +30 -0
- package/cjs/myaccount/index.js.map +1 -0
- package/cjs/myaccount/phoneApi.js +123 -0
- package/cjs/myaccount/phoneApi.js.map +1 -0
- package/cjs/myaccount/profileApi.js +58 -0
- package/cjs/myaccount/profileApi.js.map +1 -0
- package/cjs/myaccount/request.js +168 -0
- package/cjs/myaccount/request.js.map +1 -0
- package/cjs/myaccount/transactions/Base.js +38 -0
- package/cjs/myaccount/transactions/Base.js.map +1 -0
- package/cjs/myaccount/transactions/EmailChallengeTransaction.js +58 -0
- package/cjs/myaccount/transactions/EmailChallengeTransaction.js.map +1 -0
- package/cjs/myaccount/transactions/EmailStatusTransaction.js +32 -0
- package/cjs/myaccount/transactions/EmailStatusTransaction.js.map +1 -0
- package/cjs/myaccount/transactions/EmailTransaction.js +94 -0
- package/cjs/myaccount/transactions/EmailTransaction.js.map +1 -0
- package/cjs/myaccount/transactions/PhoneTransaction.js +78 -0
- package/cjs/myaccount/transactions/PhoneTransaction.js.map +1 -0
- package/cjs/myaccount/transactions/ProfileSchemaTransaction.js +19 -0
- package/cjs/myaccount/transactions/ProfileSchemaTransaction.js.map +1 -0
- package/cjs/myaccount/transactions/ProfileTransaction.js +26 -0
- package/cjs/myaccount/transactions/ProfileTransaction.js.map +1 -0
- package/cjs/myaccount/transactions/index.js +61 -0
- package/cjs/myaccount/transactions/index.js.map +1 -0
- package/cjs/myaccount/types.js +64 -0
- package/cjs/myaccount/types.js.map +1 -0
- package/cjs/oidc/decodeToken.js.map +1 -1
- package/cjs/oidc/endpoints/authorize.js.map +1 -1
- package/cjs/oidc/endpoints/index.js.map +1 -1
- package/cjs/oidc/endpoints/token.js.map +1 -1
- package/cjs/oidc/endpoints/well-known.js.map +1 -1
- package/cjs/oidc/exchangeCodeForTokens.js.map +1 -1
- package/cjs/oidc/getToken.js.map +1 -1
- package/cjs/oidc/getUserInfo.js.map +1 -1
- package/cjs/oidc/getWithPopup.js.map +1 -1
- package/cjs/oidc/getWithRedirect.js.map +1 -1
- package/cjs/oidc/getWithoutPrompt.js.map +1 -1
- package/cjs/oidc/handleOAuthResponse.js.map +1 -1
- package/cjs/oidc/index.js.map +1 -1
- package/cjs/oidc/parseFromUrl.js.map +1 -1
- package/cjs/oidc/renewToken.js.map +1 -1
- package/cjs/oidc/renewTokens.js.map +1 -1
- package/cjs/oidc/renewTokensWithRefresh.js.map +1 -1
- package/cjs/oidc/revokeToken.js.map +1 -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.map +1 -1
- package/cjs/oidc/util/loginRedirect.js.map +1 -1
- package/cjs/oidc/util/oauth.js.map +1 -1
- package/cjs/oidc/util/oauthMeta.js.map +1 -1
- package/cjs/oidc/util/pkce.js.map +1 -1
- package/cjs/oidc/util/prepareTokenParams.js.map +1 -1
- package/cjs/oidc/util/refreshToken.js.map +1 -1
- package/cjs/oidc/util/urlParams.js.map +1 -1
- package/cjs/oidc/util/validateClaims.js.map +1 -1
- package/cjs/oidc/util/validateToken.js.map +1 -1
- package/cjs/oidc/verifyToken.js.map +1 -1
- package/cjs/options/browser.js.map +1 -1
- package/cjs/options/index.js +3 -1
- package/cjs/options/index.js.map +1 -1
- package/cjs/options/node.js.map +1 -1
- package/cjs/server/serverStorage.js +2 -1
- package/cjs/server/serverStorage.js.map +1 -1
- package/cjs/services/AutoRenewService.js +7 -7
- package/cjs/services/AutoRenewService.js.map +1 -1
- package/cjs/services/LeaderElectionService.js +103 -0
- package/cjs/services/LeaderElectionService.js.map +1 -0
- package/cjs/services/SyncStorageService.js +121 -39
- package/cjs/services/SyncStorageService.js.map +1 -1
- package/cjs/services/index.js +13 -0
- package/cjs/services/index.js.map +1 -1
- package/cjs/session.js.map +1 -1
- package/cjs/tx/AuthTransaction.js.map +1 -1
- package/cjs/tx/TransactionState.js.map +1 -1
- package/cjs/tx/api.js.map +1 -1
- package/cjs/tx/index.js.map +1 -1
- package/cjs/tx/poll.js.map +1 -1
- package/cjs/tx/util.js.map +1 -1
- package/cjs/types/AuthState.js.map +1 -1
- package/cjs/types/Cookies.js.map +1 -1
- package/cjs/types/EventEmitter.js.map +1 -1
- package/cjs/types/JWT.js.map +1 -1
- package/cjs/types/OAuth.js.map +1 -1
- package/cjs/types/OktaAuthOptions.js.map +1 -1
- package/cjs/types/Service.js.map +1 -1
- package/cjs/types/Storage.js.map +1 -1
- package/cjs/types/Token.js.map +1 -1
- package/cjs/types/TokenManager.js +16 -0
- package/cjs/types/TokenManager.js.map +1 -1
- package/cjs/types/Transaction.js.map +1 -1
- package/cjs/types/UserClaims.js.map +1 -1
- package/cjs/types/api.js.map +1 -1
- package/cjs/types/http.js.map +1 -1
- package/cjs/types/index.js +13 -0
- package/cjs/types/index.js.map +1 -1
- package/cjs/util/console.js +2 -1
- package/cjs/util/console.js.map +1 -1
- package/cjs/util/index.js.map +1 -1
- package/cjs/util/misc.js +8 -0
- package/cjs/util/misc.js.map +1 -1
- package/cjs/util/object.js.map +1 -1
- package/cjs/util/sharedStorage.js.map +1 -1
- package/cjs/util/types.js.map +1 -1
- package/cjs/util/url.js.map +1 -1
- package/dist/myaccount.umd.js +3 -0
- package/dist/myaccount.umd.js.LICENSE.txt +12 -0
- package/dist/myaccount.umd.js.map +1 -0
- package/dist/okta-auth-js.min.js +1 -1
- 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.map +1 -1
- package/esm/browser/AuthStateManager.js +161 -0
- package/esm/browser/AuthStateManager.js.map +1 -0
- package/esm/browser/OktaAuth.js +560 -0
- package/esm/browser/OktaAuth.js.map +1 -0
- package/esm/browser/OktaUserAgent.js +39 -0
- package/esm/browser/OktaUserAgent.js.map +1 -0
- package/esm/browser/PromiseQueue.js +65 -0
- package/esm/browser/PromiseQueue.js.map +1 -0
- package/esm/browser/SavedObject.js +81 -0
- package/esm/browser/SavedObject.js.map +1 -0
- package/esm/browser/ServiceManager.js +115 -0
- package/esm/browser/ServiceManager.js.map +1 -0
- package/esm/browser/StorageManager.js +148 -0
- package/esm/browser/StorageManager.js.map +1 -0
- package/esm/browser/TokenManager.js +386 -0
- package/esm/browser/TokenManager.js.map +1 -0
- package/esm/browser/TransactionManager.js +244 -0
- package/esm/browser/TransactionManager.js.map +1 -0
- package/esm/browser/_virtual/_tslib.js +41 -0
- package/esm/browser/_virtual/_tslib.js.map +1 -0
- package/esm/browser/browser/browserStorage.js +216 -0
- package/esm/browser/browser/browserStorage.js.map +1 -0
- package/esm/browser/browser/fingerprint.js +69 -0
- package/esm/browser/browser/fingerprint.js.map +1 -0
- package/esm/browser/builderUtil.js +39 -0
- package/esm/browser/builderUtil.js.map +1 -0
- package/esm/browser/clock.js +28 -0
- package/esm/browser/clock.js.map +1 -0
- package/esm/browser/constants.js +37 -0
- package/esm/browser/constants.js.map +1 -0
- package/esm/browser/crypto/base64.js +66 -0
- package/esm/browser/crypto/base64.js.map +1 -0
- package/esm/browser/crypto/browser.js +18 -0
- package/esm/browser/crypto/browser.js.map +1 -0
- package/esm/browser/crypto/index.js +17 -0
- package/esm/browser/crypto/index.js.map +1 -0
- package/esm/browser/crypto/oidcHash.js +28 -0
- package/esm/browser/crypto/oidcHash.js.map +1 -0
- package/esm/browser/crypto/verifyToken.js +38 -0
- package/esm/browser/crypto/verifyToken.js.map +1 -0
- package/esm/browser/crypto/webauthn.js +79 -0
- package/esm/browser/crypto/webauthn.js.map +1 -0
- package/esm/browser/errors/AuthApiError.js +35 -0
- package/esm/browser/errors/AuthApiError.js.map +1 -0
- package/esm/browser/errors/AuthPollStopError.js +23 -0
- package/esm/browser/errors/AuthPollStopError.js.map +1 -0
- package/esm/browser/errors/AuthSdkError.js +31 -0
- package/esm/browser/errors/AuthSdkError.js.map +1 -0
- package/esm/browser/errors/CustomError.js +21 -0
- package/esm/browser/errors/CustomError.js.map +1 -0
- package/esm/browser/errors/OAuthError.js +27 -0
- package/esm/browser/errors/OAuthError.js.map +1 -0
- package/esm/browser/errors/index.js +26 -0
- package/esm/browser/errors/index.js.map +1 -0
- package/esm/browser/features.js +67 -0
- package/esm/browser/features.js.map +1 -0
- package/esm/browser/fetch/fetchRequest.js +90 -0
- package/esm/browser/fetch/fetchRequest.js.map +1 -0
- package/esm/browser/http/headers.js +19 -0
- package/esm/browser/http/headers.js.map +1 -0
- package/esm/browser/http/request.js +133 -0
- package/esm/browser/http/request.js.map +1 -0
- package/esm/browser/idx/authenticate.js +25 -0
- package/esm/browser/idx/authenticate.js.map +1 -0
- package/esm/browser/idx/authenticator/Authenticator.js +20 -0
- package/esm/browser/idx/authenticator/Authenticator.js.map +1 -0
- package/esm/browser/idx/authenticator/OktaPassword.js +33 -0
- package/esm/browser/idx/authenticator/OktaPassword.js.map +1 -0
- package/esm/browser/idx/authenticator/OktaVerifyTotp.js +26 -0
- package/esm/browser/idx/authenticator/OktaVerifyTotp.js.map +1 -0
- package/esm/browser/idx/authenticator/SecurityQuestionEnrollment.js +45 -0
- package/esm/browser/idx/authenticator/SecurityQuestionEnrollment.js.map +1 -0
- package/esm/browser/idx/authenticator/SecurityQuestionVerification.js +42 -0
- package/esm/browser/idx/authenticator/SecurityQuestionVerification.js.map +1 -0
- package/esm/browser/idx/authenticator/VerificationCodeAuthenticator.js +33 -0
- package/esm/browser/idx/authenticator/VerificationCodeAuthenticator.js.map +1 -0
- package/esm/browser/idx/authenticator/WebauthnEnrollment.js +41 -0
- package/esm/browser/idx/authenticator/WebauthnEnrollment.js.map +1 -0
- package/esm/browser/idx/authenticator/WebauthnVerification.js +43 -0
- package/esm/browser/idx/authenticator/WebauthnVerification.js.map +1 -0
- package/esm/browser/idx/authenticator/getAuthenticator.js +51 -0
- package/esm/browser/idx/authenticator/getAuthenticator.js.map +1 -0
- package/esm/browser/idx/authenticator/util.js +55 -0
- package/esm/browser/idx/authenticator/util.js.map +1 -0
- package/esm/browser/idx/cancel.js +42 -0
- package/esm/browser/idx/cancel.js.map +1 -0
- package/esm/browser/idx/emailVerify.js +46 -0
- package/esm/browser/idx/emailVerify.js.map +1 -0
- package/esm/browser/idx/flow/AccountUnlockFlow.js +43 -0
- package/esm/browser/idx/flow/AccountUnlockFlow.js.map +1 -0
- package/esm/browser/idx/flow/AuthenticationFlow.js +49 -0
- package/esm/browser/idx/flow/AuthenticationFlow.js.map +1 -0
- package/esm/browser/idx/flow/FlowSpecification.js +56 -0
- package/esm/browser/idx/flow/FlowSpecification.js.map +1 -0
- package/esm/browser/idx/flow/PasswordRecoveryFlow.js +47 -0
- package/esm/browser/idx/flow/PasswordRecoveryFlow.js.map +1 -0
- package/esm/browser/idx/flow/RegistrationFlow.js +46 -0
- package/esm/browser/idx/flow/RegistrationFlow.js.map +1 -0
- package/esm/browser/idx/handleInteractionCodeRedirect.js +41 -0
- package/esm/browser/idx/handleInteractionCodeRedirect.js.map +1 -0
- package/esm/browser/idx/idxState/index.js +46 -0
- package/esm/browser/idx/idxState/index.js.map +1 -0
- package/esm/browser/idx/idxState/v1/actionParser.js +53 -0
- package/esm/browser/idx/idxState/v1/actionParser.js.map +1 -0
- package/esm/browser/idx/idxState/v1/generateIdxAction.js +65 -0
- package/esm/browser/idx/idxState/v1/generateIdxAction.js.map +1 -0
- package/esm/browser/idx/idxState/v1/idxResponseParser.js +95 -0
- package/esm/browser/idx/idxState/v1/idxResponseParser.js.map +1 -0
- package/esm/browser/idx/idxState/v1/makeIdxState.js +46 -0
- package/esm/browser/idx/idxState/v1/makeIdxState.js.map +1 -0
- package/esm/browser/idx/idxState/v1/parsers.js +20 -0
- package/esm/browser/idx/idxState/v1/parsers.js.map +1 -0
- package/esm/browser/idx/idxState/v1/remediationParser.js +25 -0
- package/esm/browser/idx/idxState/v1/remediationParser.js.map +1 -0
- package/esm/browser/idx/interact.js +62 -0
- package/esm/browser/idx/interact.js.map +1 -0
- package/esm/browser/idx/introspect.js +68 -0
- package/esm/browser/idx/introspect.js.map +1 -0
- package/esm/browser/idx/poll.js +52 -0
- package/esm/browser/idx/poll.js.map +1 -0
- package/esm/browser/idx/proceed.js +34 -0
- package/esm/browser/idx/proceed.js.map +1 -0
- package/esm/browser/idx/recoverPassword.js +41 -0
- package/esm/browser/idx/recoverPassword.js.map +1 -0
- package/esm/browser/idx/register.js +36 -0
- package/esm/browser/idx/register.js.map +1 -0
- package/esm/browser/idx/remediate.js +134 -0
- package/esm/browser/idx/remediate.js.map +1 -0
- package/esm/browser/idx/remediators/AuthenticatorEnrollmentData.js +48 -0
- package/esm/browser/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -0
- package/esm/browser/idx/remediators/AuthenticatorVerificationData.js +71 -0
- package/esm/browser/idx/remediators/AuthenticatorVerificationData.js.map +1 -0
- package/esm/browser/idx/remediators/Base/AuthenticatorData.js +82 -0
- package/esm/browser/idx/remediators/Base/AuthenticatorData.js.map +1 -0
- package/esm/browser/idx/remediators/Base/Remediator.js +177 -0
- package/esm/browser/idx/remediators/Base/Remediator.js.map +1 -0
- package/esm/browser/idx/remediators/Base/SelectAuthenticator.js +90 -0
- package/esm/browser/idx/remediators/Base/SelectAuthenticator.js.map +1 -0
- package/esm/browser/idx/remediators/Base/VerifyAuthenticator.js +44 -0
- package/esm/browser/idx/remediators/Base/VerifyAuthenticator.js.map +1 -0
- package/esm/browser/idx/remediators/ChallengeAuthenticator.js +20 -0
- package/esm/browser/idx/remediators/ChallengeAuthenticator.js.map +1 -0
- package/esm/browser/idx/remediators/ChallengePoll.js +23 -0
- package/esm/browser/idx/remediators/ChallengePoll.js.map +1 -0
- package/esm/browser/idx/remediators/EnrollAuthenticator.js +20 -0
- package/esm/browser/idx/remediators/EnrollAuthenticator.js.map +1 -0
- package/esm/browser/idx/remediators/EnrollPoll.js +38 -0
- package/esm/browser/idx/remediators/EnrollPoll.js.map +1 -0
- package/esm/browser/idx/remediators/EnrollProfile.js +52 -0
- package/esm/browser/idx/remediators/EnrollProfile.js.map +1 -0
- package/esm/browser/idx/remediators/EnrollmentChannelData.js +49 -0
- package/esm/browser/idx/remediators/EnrollmentChannelData.js.map +1 -0
- package/esm/browser/idx/remediators/GenericRemediator/GenericRemediator.js +60 -0
- package/esm/browser/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -0
- package/esm/browser/idx/remediators/GenericRemediator/util.js +50 -0
- package/esm/browser/idx/remediators/GenericRemediator/util.js.map +1 -0
- package/esm/browser/idx/remediators/Identify.js +40 -0
- package/esm/browser/idx/remediators/Identify.js.map +1 -0
- package/esm/browser/idx/remediators/ReEnrollAuthenticator.js +34 -0
- package/esm/browser/idx/remediators/ReEnrollAuthenticator.js.map +1 -0
- package/esm/browser/idx/remediators/RedirectIdp.js +32 -0
- package/esm/browser/idx/remediators/RedirectIdp.js.map +1 -0
- package/esm/browser/idx/remediators/ResetAuthenticator.js +20 -0
- package/esm/browser/idx/remediators/ResetAuthenticator.js.map +1 -0
- package/esm/browser/idx/remediators/SelectAuthenticatorAuthenticate.js +35 -0
- package/esm/browser/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -0
- package/esm/browser/idx/remediators/SelectAuthenticatorEnroll.js +20 -0
- package/esm/browser/idx/remediators/SelectAuthenticatorEnroll.js.map +1 -0
- package/esm/browser/idx/remediators/SelectAuthenticatorUnlockAccount.js +44 -0
- package/esm/browser/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -0
- package/esm/browser/idx/remediators/SelectEnrollProfile.js +23 -0
- package/esm/browser/idx/remediators/SelectEnrollProfile.js.map +1 -0
- package/esm/browser/idx/remediators/SelectEnrollmentChannel.js +50 -0
- package/esm/browser/idx/remediators/SelectEnrollmentChannel.js.map +1 -0
- package/esm/browser/idx/remediators/Skip.js +23 -0
- package/esm/browser/idx/remediators/Skip.js.map +1 -0
- package/esm/browser/idx/remediators/index.js +33 -0
- package/esm/browser/idx/remediators/index.js.map +1 -0
- package/esm/browser/idx/remediators/util.js +34 -0
- package/esm/browser/idx/remediators/util.js.map +1 -0
- package/esm/browser/idx/run.js +245 -0
- package/esm/browser/idx/run.js.map +1 -0
- package/esm/browser/idx/startTransaction.js +21 -0
- package/esm/browser/idx/startTransaction.js.map +1 -0
- package/esm/browser/idx/transactionMeta.js +110 -0
- package/esm/browser/idx/transactionMeta.js.map +1 -0
- package/esm/browser/idx/types/api.js +43 -0
- package/esm/browser/idx/types/api.js.map +1 -0
- package/esm/browser/idx/types/idx-js.js +21 -0
- package/esm/browser/idx/types/idx-js.js.map +1 -0
- package/esm/browser/idx/unlockAccount.js +32 -0
- package/esm/browser/idx/unlockAccount.js.map +1 -0
- package/esm/browser/idx/util.js +223 -0
- package/esm/browser/idx/util.js.map +1 -0
- package/esm/browser/index.js +91 -0
- package/esm/browser/index.js.map +1 -0
- package/esm/browser/myaccount/emailApi.js +86 -0
- package/esm/browser/myaccount/emailApi.js.map +1 -0
- package/esm/browser/myaccount/myaccount/index.js +24 -0
- package/esm/browser/myaccount/myaccount/index.js.map +1 -0
- package/esm/browser/myaccount/phoneApi.js +76 -0
- package/esm/browser/myaccount/phoneApi.js.map +1 -0
- package/esm/browser/myaccount/profileApi.js +46 -0
- package/esm/browser/myaccount/profileApi.js.map +1 -0
- package/esm/browser/myaccount/request.js +121 -0
- package/esm/browser/myaccount/request.js.map +1 -0
- package/esm/browser/myaccount/transactions/Base.js +32 -0
- package/esm/browser/myaccount/transactions/Base.js.map +1 -0
- package/esm/browser/myaccount/transactions/EmailChallengeTransaction.js +48 -0
- package/esm/browser/myaccount/transactions/EmailChallengeTransaction.js.map +1 -0
- package/esm/browser/myaccount/transactions/EmailStatusTransaction.js +28 -0
- package/esm/browser/myaccount/transactions/EmailStatusTransaction.js.map +1 -0
- package/esm/browser/myaccount/transactions/EmailTransaction.js +81 -0
- package/esm/browser/myaccount/transactions/EmailTransaction.js.map +1 -0
- package/esm/browser/myaccount/transactions/PhoneTransaction.js +67 -0
- package/esm/browser/myaccount/transactions/PhoneTransaction.js.map +1 -0
- package/esm/browser/myaccount/transactions/ProfileSchemaTransaction.js +23 -0
- package/esm/browser/myaccount/transactions/ProfileSchemaTransaction.js.map +1 -0
- package/esm/browser/myaccount/transactions/ProfileTransaction.js +26 -0
- package/esm/browser/myaccount/transactions/ProfileTransaction.js.map +1 -0
- package/esm/browser/myaccount/types.js +25 -0
- package/esm/browser/myaccount/types.js.map +1 -0
- package/esm/browser/oidc/decodeToken.js +33 -0
- package/esm/browser/oidc/decodeToken.js.map +1 -0
- package/esm/browser/oidc/endpoints/authorize.js +63 -0
- package/esm/browser/oidc/endpoints/authorize.js.map +1 -0
- package/esm/browser/oidc/endpoints/token.js +83 -0
- package/esm/browser/oidc/endpoints/token.js.map +1 -0
- package/esm/browser/oidc/endpoints/well-known.js +55 -0
- package/esm/browser/oidc/endpoints/well-known.js.map +1 -0
- package/esm/browser/oidc/exchangeCodeForTokens.js +58 -0
- package/esm/browser/oidc/exchangeCodeForTokens.js.map +1 -0
- package/esm/browser/oidc/getToken.js +117 -0
- package/esm/browser/oidc/getToken.js.map +1 -0
- package/esm/browser/oidc/getUserInfo.js +69 -0
- package/esm/browser/oidc/getUserInfo.js.map +1 -0
- package/esm/browser/oidc/getWithPopup.js +35 -0
- package/esm/browser/oidc/getWithPopup.js.map +1 -0
- package/esm/browser/oidc/getWithRedirect.js +34 -0
- package/esm/browser/oidc/getWithRedirect.js.map +1 -0
- package/esm/browser/oidc/getWithoutPrompt.js +31 -0
- package/esm/browser/oidc/getWithoutPrompt.js.map +1 -0
- package/esm/browser/oidc/handleOAuthResponse.js +119 -0
- package/esm/browser/oidc/handleOAuthResponse.js.map +1 -0
- package/esm/browser/oidc/parseFromUrl.js +116 -0
- package/esm/browser/oidc/parseFromUrl.js.map +1 -0
- package/esm/browser/oidc/renewToken.js +67 -0
- package/esm/browser/oidc/renewToken.js.map +1 -0
- package/esm/browser/oidc/renewTokens.js +58 -0
- package/esm/browser/oidc/renewTokens.js.map +1 -0
- package/esm/browser/oidc/renewTokensWithRefresh.js +47 -0
- package/esm/browser/oidc/renewTokensWithRefresh.js.map +1 -0
- package/esm/browser/oidc/revokeToken.js +49 -0
- package/esm/browser/oidc/revokeToken.js.map +1 -0
- package/esm/browser/oidc/util/browser.js +69 -0
- package/esm/browser/oidc/util/browser.js.map +1 -0
- package/esm/browser/oidc/util/defaultTokenParams.js +34 -0
- package/esm/browser/oidc/util/defaultTokenParams.js.map +1 -0
- package/esm/browser/oidc/util/errors.js +38 -0
- package/esm/browser/oidc/util/errors.js.map +1 -0
- package/esm/browser/oidc/util/loginRedirect.js +66 -0
- package/esm/browser/oidc/util/loginRedirect.js.map +1 -0
- package/esm/browser/oidc/util/oauth.js +65 -0
- package/esm/browser/oidc/util/oauth.js.map +1 -0
- package/esm/browser/oidc/util/oauthMeta.js +38 -0
- package/esm/browser/oidc/util/oauthMeta.js.map +1 -0
- package/esm/browser/oidc/util/pkce.js +48 -0
- package/esm/browser/oidc/util/pkce.js.map +1 -0
- package/esm/browser/oidc/util/prepareTokenParams.js +65 -0
- package/esm/browser/oidc/util/prepareTokenParams.js.map +1 -0
- package/esm/browser/oidc/util/refreshToken.js +33 -0
- package/esm/browser/oidc/util/refreshToken.js.map +1 -0
- package/esm/browser/oidc/util/urlParams.js +43 -0
- package/esm/browser/oidc/util/urlParams.js.map +1 -0
- package/esm/browser/oidc/util/validateClaims.js +48 -0
- package/esm/browser/oidc/util/validateClaims.js.map +1 -0
- package/esm/browser/oidc/util/validateToken.js +34 -0
- package/esm/browser/oidc/util/validateToken.js.map +1 -0
- package/esm/browser/oidc/verifyToken.js +54 -0
- package/esm/browser/oidc/verifyToken.js.map +1 -0
- package/esm/browser/options/browser.js +77 -0
- package/esm/browser/options/browser.js.map +1 -0
- package/esm/browser/options/index.js +85 -0
- package/esm/browser/options/index.js.map +1 -0
- package/esm/browser/services/AutoRenewService.js +77 -0
- package/esm/browser/services/AutoRenewService.js.map +1 -0
- package/esm/browser/services/LeaderElectionService.js +74 -0
- package/esm/browser/services/LeaderElectionService.js.map +1 -0
- package/esm/browser/services/SyncStorageService.js +130 -0
- package/esm/browser/services/SyncStorageService.js.map +1 -0
- package/esm/browser/session.js +66 -0
- package/esm/browser/session.js.map +1 -0
- package/esm/browser/tx/AuthTransaction.js +174 -0
- package/esm/browser/tx/AuthTransaction.js.map +1 -0
- package/esm/browser/tx/api.js +72 -0
- package/esm/browser/tx/api.js.map +1 -0
- package/esm/browser/tx/poll.js +117 -0
- package/esm/browser/tx/poll.js.map +1 -0
- package/esm/browser/tx/util.js +26 -0
- package/esm/browser/tx/util.js.map +1 -0
- package/esm/browser/types/Token.js +32 -0
- package/esm/browser/types/Token.js.map +1 -0
- package/esm/browser/types/TokenManager.js +21 -0
- package/esm/browser/types/TokenManager.js.map +1 -0
- package/esm/browser/types/Transaction.js +52 -0
- package/esm/browser/types/Transaction.js.map +1 -0
- package/esm/browser/util/console.js +50 -0
- package/esm/browser/util/console.js.map +1 -0
- package/esm/browser/util/misc.js +39 -0
- package/esm/browser/util/misc.js.map +1 -0
- package/esm/browser/util/object.js +98 -0
- package/esm/browser/util/object.js.map +1 -0
- package/esm/browser/util/sharedStorage.js +56 -0
- package/esm/browser/util/sharedStorage.js.map +1 -0
- package/esm/browser/util/types.js +30 -0
- package/esm/browser/util/types.js.map +1 -0
- package/esm/browser/util/url.js +57 -0
- package/esm/browser/util/url.js.map +1 -0
- package/esm/node/AuthStateManager.js +161 -0
- package/esm/node/AuthStateManager.js.map +1 -0
- package/esm/node/OktaAuth.js +560 -0
- package/esm/node/OktaAuth.js.map +1 -0
- package/esm/node/OktaUserAgent.js +39 -0
- package/esm/node/OktaUserAgent.js.map +1 -0
- package/esm/node/PromiseQueue.js +65 -0
- package/esm/node/PromiseQueue.js.map +1 -0
- package/esm/node/SavedObject.js +81 -0
- package/esm/node/SavedObject.js.map +1 -0
- package/esm/node/ServiceManager.js +115 -0
- package/esm/node/ServiceManager.js.map +1 -0
- package/esm/node/StorageManager.js +148 -0
- package/esm/node/StorageManager.js.map +1 -0
- package/esm/node/TokenManager.js +387 -0
- package/esm/node/TokenManager.js.map +1 -0
- package/esm/node/TransactionManager.js +244 -0
- package/esm/node/TransactionManager.js.map +1 -0
- package/esm/node/_virtual/_tslib.js +41 -0
- package/esm/node/_virtual/_tslib.js.map +1 -0
- package/esm/node/browser/browserStorage.js +216 -0
- package/esm/node/browser/browserStorage.js.map +1 -0
- package/esm/node/browser/fingerprint.js +70 -0
- package/esm/node/browser/fingerprint.js.map +1 -0
- package/esm/node/builderUtil.js +39 -0
- package/esm/node/builderUtil.js.map +1 -0
- package/esm/node/clock.js +28 -0
- package/esm/node/clock.js.map +1 -0
- package/esm/node/constants.js +37 -0
- package/esm/node/constants.js.map +1 -0
- package/esm/node/crypto/base64.js +66 -0
- package/esm/node/crypto/base64.js.map +1 -0
- package/esm/node/crypto/index.js +17 -0
- package/esm/node/crypto/index.js.map +1 -0
- package/esm/node/crypto/node.js +48 -0
- package/esm/node/crypto/node.js.map +1 -0
- package/esm/node/crypto/oidcHash.js +28 -0
- package/esm/node/crypto/oidcHash.js.map +1 -0
- package/esm/node/crypto/verifyToken.js +38 -0
- package/esm/node/crypto/verifyToken.js.map +1 -0
- package/esm/node/crypto/webauthn.js +79 -0
- package/esm/node/crypto/webauthn.js.map +1 -0
- package/esm/node/errors/AuthApiError.js +35 -0
- package/esm/node/errors/AuthApiError.js.map +1 -0
- package/esm/node/errors/AuthPollStopError.js +23 -0
- package/esm/node/errors/AuthPollStopError.js.map +1 -0
- package/esm/node/errors/AuthSdkError.js +31 -0
- package/esm/node/errors/AuthSdkError.js.map +1 -0
- package/esm/node/errors/CustomError.js +21 -0
- package/esm/node/errors/CustomError.js.map +1 -0
- package/esm/node/errors/OAuthError.js +27 -0
- package/esm/node/errors/OAuthError.js.map +1 -0
- package/esm/node/errors/index.js +26 -0
- package/esm/node/errors/index.js.map +1 -0
- package/esm/node/features.js +67 -0
- package/esm/node/features.js.map +1 -0
- package/esm/node/fetch/fetchRequest.js +90 -0
- package/esm/node/fetch/fetchRequest.js.map +1 -0
- package/esm/node/http/headers.js +19 -0
- package/esm/node/http/headers.js.map +1 -0
- package/esm/node/http/request.js +133 -0
- package/esm/node/http/request.js.map +1 -0
- package/esm/node/idx/authenticate.js +25 -0
- package/esm/node/idx/authenticate.js.map +1 -0
- package/esm/node/idx/authenticator/Authenticator.js +20 -0
- package/esm/node/idx/authenticator/Authenticator.js.map +1 -0
- package/esm/node/idx/authenticator/OktaPassword.js +33 -0
- package/esm/node/idx/authenticator/OktaPassword.js.map +1 -0
- package/esm/node/idx/authenticator/OktaVerifyTotp.js +26 -0
- package/esm/node/idx/authenticator/OktaVerifyTotp.js.map +1 -0
- package/esm/node/idx/authenticator/SecurityQuestionEnrollment.js +45 -0
- package/esm/node/idx/authenticator/SecurityQuestionEnrollment.js.map +1 -0
- package/esm/node/idx/authenticator/SecurityQuestionVerification.js +42 -0
- package/esm/node/idx/authenticator/SecurityQuestionVerification.js.map +1 -0
- package/esm/node/idx/authenticator/VerificationCodeAuthenticator.js +33 -0
- package/esm/node/idx/authenticator/VerificationCodeAuthenticator.js.map +1 -0
- package/esm/node/idx/authenticator/WebauthnEnrollment.js +41 -0
- package/esm/node/idx/authenticator/WebauthnEnrollment.js.map +1 -0
- package/esm/node/idx/authenticator/WebauthnVerification.js +43 -0
- package/esm/node/idx/authenticator/WebauthnVerification.js.map +1 -0
- package/esm/node/idx/authenticator/getAuthenticator.js +51 -0
- package/esm/node/idx/authenticator/getAuthenticator.js.map +1 -0
- package/esm/node/idx/authenticator/util.js +55 -0
- package/esm/node/idx/authenticator/util.js.map +1 -0
- package/esm/node/idx/cancel.js +42 -0
- package/esm/node/idx/cancel.js.map +1 -0
- package/esm/node/idx/emailVerify.js +46 -0
- package/esm/node/idx/emailVerify.js.map +1 -0
- package/esm/node/idx/flow/AccountUnlockFlow.js +43 -0
- package/esm/node/idx/flow/AccountUnlockFlow.js.map +1 -0
- package/esm/node/idx/flow/AuthenticationFlow.js +49 -0
- package/esm/node/idx/flow/AuthenticationFlow.js.map +1 -0
- package/esm/node/idx/flow/FlowSpecification.js +56 -0
- package/esm/node/idx/flow/FlowSpecification.js.map +1 -0
- package/esm/node/idx/flow/PasswordRecoveryFlow.js +47 -0
- package/esm/node/idx/flow/PasswordRecoveryFlow.js.map +1 -0
- package/esm/node/idx/flow/RegistrationFlow.js +46 -0
- package/esm/node/idx/flow/RegistrationFlow.js.map +1 -0
- package/esm/node/idx/handleInteractionCodeRedirect.js +41 -0
- package/esm/node/idx/handleInteractionCodeRedirect.js.map +1 -0
- package/esm/node/idx/idxState/index.js +46 -0
- package/esm/node/idx/idxState/index.js.map +1 -0
- package/esm/node/idx/idxState/v1/actionParser.js +53 -0
- package/esm/node/idx/idxState/v1/actionParser.js.map +1 -0
- package/esm/node/idx/idxState/v1/generateIdxAction.js +65 -0
- package/esm/node/idx/idxState/v1/generateIdxAction.js.map +1 -0
- package/esm/node/idx/idxState/v1/idxResponseParser.js +95 -0
- package/esm/node/idx/idxState/v1/idxResponseParser.js.map +1 -0
- package/esm/node/idx/idxState/v1/makeIdxState.js +46 -0
- package/esm/node/idx/idxState/v1/makeIdxState.js.map +1 -0
- package/esm/node/idx/idxState/v1/parsers.js +20 -0
- package/esm/node/idx/idxState/v1/parsers.js.map +1 -0
- package/esm/node/idx/idxState/v1/remediationParser.js +25 -0
- package/esm/node/idx/idxState/v1/remediationParser.js.map +1 -0
- package/esm/node/idx/interact.js +63 -0
- package/esm/node/idx/interact.js.map +1 -0
- package/esm/node/idx/introspect.js +69 -0
- package/esm/node/idx/introspect.js.map +1 -0
- package/esm/node/idx/poll.js +52 -0
- package/esm/node/idx/poll.js.map +1 -0
- package/esm/node/idx/proceed.js +34 -0
- package/esm/node/idx/proceed.js.map +1 -0
- package/esm/node/idx/recoverPassword.js +41 -0
- package/esm/node/idx/recoverPassword.js.map +1 -0
- package/esm/node/idx/register.js +36 -0
- package/esm/node/idx/register.js.map +1 -0
- package/esm/node/idx/remediate.js +134 -0
- package/esm/node/idx/remediate.js.map +1 -0
- package/esm/node/idx/remediators/AuthenticatorEnrollmentData.js +48 -0
- package/esm/node/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -0
- package/esm/node/idx/remediators/AuthenticatorVerificationData.js +71 -0
- package/esm/node/idx/remediators/AuthenticatorVerificationData.js.map +1 -0
- package/esm/node/idx/remediators/Base/AuthenticatorData.js +82 -0
- package/esm/node/idx/remediators/Base/AuthenticatorData.js.map +1 -0
- package/esm/node/idx/remediators/Base/Remediator.js +177 -0
- package/esm/node/idx/remediators/Base/Remediator.js.map +1 -0
- package/esm/node/idx/remediators/Base/SelectAuthenticator.js +90 -0
- package/esm/node/idx/remediators/Base/SelectAuthenticator.js.map +1 -0
- package/esm/node/idx/remediators/Base/VerifyAuthenticator.js +44 -0
- package/esm/node/idx/remediators/Base/VerifyAuthenticator.js.map +1 -0
- package/esm/node/idx/remediators/ChallengeAuthenticator.js +20 -0
- package/esm/node/idx/remediators/ChallengeAuthenticator.js.map +1 -0
- package/esm/node/idx/remediators/ChallengePoll.js +23 -0
- package/esm/node/idx/remediators/ChallengePoll.js.map +1 -0
- package/esm/node/idx/remediators/EnrollAuthenticator.js +20 -0
- package/esm/node/idx/remediators/EnrollAuthenticator.js.map +1 -0
- package/esm/node/idx/remediators/EnrollPoll.js +38 -0
- package/esm/node/idx/remediators/EnrollPoll.js.map +1 -0
- package/esm/node/idx/remediators/EnrollProfile.js +52 -0
- package/esm/node/idx/remediators/EnrollProfile.js.map +1 -0
- package/esm/node/idx/remediators/EnrollmentChannelData.js +49 -0
- package/esm/node/idx/remediators/EnrollmentChannelData.js.map +1 -0
- package/esm/node/idx/remediators/GenericRemediator/GenericRemediator.js +60 -0
- package/esm/node/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -0
- package/esm/node/idx/remediators/GenericRemediator/util.js +50 -0
- package/esm/node/idx/remediators/GenericRemediator/util.js.map +1 -0
- package/esm/node/idx/remediators/Identify.js +40 -0
- package/esm/node/idx/remediators/Identify.js.map +1 -0
- package/esm/node/idx/remediators/ReEnrollAuthenticator.js +34 -0
- package/esm/node/idx/remediators/ReEnrollAuthenticator.js.map +1 -0
- package/esm/node/idx/remediators/RedirectIdp.js +32 -0
- package/esm/node/idx/remediators/RedirectIdp.js.map +1 -0
- package/esm/node/idx/remediators/ResetAuthenticator.js +20 -0
- package/esm/node/idx/remediators/ResetAuthenticator.js.map +1 -0
- package/esm/node/idx/remediators/SelectAuthenticatorAuthenticate.js +35 -0
- package/esm/node/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -0
- package/esm/node/idx/remediators/SelectAuthenticatorEnroll.js +20 -0
- package/esm/node/idx/remediators/SelectAuthenticatorEnroll.js.map +1 -0
- package/esm/node/idx/remediators/SelectAuthenticatorUnlockAccount.js +44 -0
- package/esm/node/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -0
- package/esm/node/idx/remediators/SelectEnrollProfile.js +23 -0
- package/esm/node/idx/remediators/SelectEnrollProfile.js.map +1 -0
- package/esm/node/idx/remediators/SelectEnrollmentChannel.js +50 -0
- package/esm/node/idx/remediators/SelectEnrollmentChannel.js.map +1 -0
- package/esm/node/idx/remediators/Skip.js +23 -0
- package/esm/node/idx/remediators/Skip.js.map +1 -0
- package/esm/node/idx/remediators/index.js +33 -0
- package/esm/node/idx/remediators/index.js.map +1 -0
- package/esm/node/idx/remediators/util.js +34 -0
- package/esm/node/idx/remediators/util.js.map +1 -0
- package/esm/node/idx/run.js +245 -0
- package/esm/node/idx/run.js.map +1 -0
- package/esm/node/idx/startTransaction.js +21 -0
- package/esm/node/idx/startTransaction.js.map +1 -0
- package/esm/node/idx/transactionMeta.js +111 -0
- package/esm/node/idx/transactionMeta.js.map +1 -0
- package/esm/node/idx/types/api.js +43 -0
- package/esm/node/idx/types/api.js.map +1 -0
- package/esm/node/idx/types/idx-js.js +21 -0
- package/esm/node/idx/types/idx-js.js.map +1 -0
- package/esm/node/idx/unlockAccount.js +32 -0
- package/esm/node/idx/unlockAccount.js.map +1 -0
- package/esm/node/idx/util.js +223 -0
- package/esm/node/idx/util.js.map +1 -0
- package/esm/node/index.js +91 -0
- package/esm/node/index.js.map +1 -0
- package/esm/node/myaccount/emailApi.js +86 -0
- package/esm/node/myaccount/emailApi.js.map +1 -0
- package/esm/node/myaccount/myaccount/index.js +24 -0
- package/esm/node/myaccount/myaccount/index.js.map +1 -0
- package/esm/node/myaccount/phoneApi.js +76 -0
- package/esm/node/myaccount/phoneApi.js.map +1 -0
- package/esm/node/myaccount/profileApi.js +46 -0
- package/esm/node/myaccount/profileApi.js.map +1 -0
- package/esm/node/myaccount/request.js +121 -0
- package/esm/node/myaccount/request.js.map +1 -0
- package/esm/node/myaccount/transactions/Base.js +32 -0
- package/esm/node/myaccount/transactions/Base.js.map +1 -0
- package/esm/node/myaccount/transactions/EmailChallengeTransaction.js +48 -0
- package/esm/node/myaccount/transactions/EmailChallengeTransaction.js.map +1 -0
- package/esm/node/myaccount/transactions/EmailStatusTransaction.js +28 -0
- package/esm/node/myaccount/transactions/EmailStatusTransaction.js.map +1 -0
- package/esm/node/myaccount/transactions/EmailTransaction.js +81 -0
- package/esm/node/myaccount/transactions/EmailTransaction.js.map +1 -0
- package/esm/node/myaccount/transactions/PhoneTransaction.js +67 -0
- package/esm/node/myaccount/transactions/PhoneTransaction.js.map +1 -0
- package/esm/node/myaccount/transactions/ProfileSchemaTransaction.js +23 -0
- package/esm/node/myaccount/transactions/ProfileSchemaTransaction.js.map +1 -0
- package/esm/node/myaccount/transactions/ProfileTransaction.js +26 -0
- package/esm/node/myaccount/transactions/ProfileTransaction.js.map +1 -0
- package/esm/node/myaccount/types.js +25 -0
- package/esm/node/myaccount/types.js.map +1 -0
- package/esm/node/oidc/decodeToken.js +34 -0
- package/esm/node/oidc/decodeToken.js.map +1 -0
- package/esm/node/oidc/endpoints/authorize.js +63 -0
- package/esm/node/oidc/endpoints/authorize.js.map +1 -0
- package/esm/node/oidc/endpoints/token.js +83 -0
- package/esm/node/oidc/endpoints/token.js.map +1 -0
- package/esm/node/oidc/endpoints/well-known.js +55 -0
- package/esm/node/oidc/endpoints/well-known.js.map +1 -0
- package/esm/node/oidc/exchangeCodeForTokens.js +59 -0
- package/esm/node/oidc/exchangeCodeForTokens.js.map +1 -0
- package/esm/node/oidc/getToken.js +118 -0
- package/esm/node/oidc/getToken.js.map +1 -0
- package/esm/node/oidc/getUserInfo.js +69 -0
- package/esm/node/oidc/getUserInfo.js.map +1 -0
- package/esm/node/oidc/getWithPopup.js +36 -0
- package/esm/node/oidc/getWithPopup.js.map +1 -0
- package/esm/node/oidc/getWithRedirect.js +35 -0
- package/esm/node/oidc/getWithRedirect.js.map +1 -0
- package/esm/node/oidc/getWithoutPrompt.js +31 -0
- package/esm/node/oidc/getWithoutPrompt.js.map +1 -0
- package/esm/node/oidc/handleOAuthResponse.js +120 -0
- package/esm/node/oidc/handleOAuthResponse.js.map +1 -0
- package/esm/node/oidc/parseFromUrl.js +117 -0
- package/esm/node/oidc/parseFromUrl.js.map +1 -0
- package/esm/node/oidc/renewToken.js +67 -0
- package/esm/node/oidc/renewToken.js.map +1 -0
- package/esm/node/oidc/renewTokens.js +59 -0
- package/esm/node/oidc/renewTokens.js.map +1 -0
- package/esm/node/oidc/renewTokensWithRefresh.js +47 -0
- package/esm/node/oidc/renewTokensWithRefresh.js.map +1 -0
- package/esm/node/oidc/revokeToken.js +49 -0
- package/esm/node/oidc/revokeToken.js.map +1 -0
- package/esm/node/oidc/util/browser.js +69 -0
- package/esm/node/oidc/util/browser.js.map +1 -0
- package/esm/node/oidc/util/defaultTokenParams.js +34 -0
- package/esm/node/oidc/util/defaultTokenParams.js.map +1 -0
- package/esm/node/oidc/util/errors.js +38 -0
- package/esm/node/oidc/util/errors.js.map +1 -0
- package/esm/node/oidc/util/loginRedirect.js +66 -0
- package/esm/node/oidc/util/loginRedirect.js.map +1 -0
- package/esm/node/oidc/util/oauth.js +65 -0
- package/esm/node/oidc/util/oauth.js.map +1 -0
- package/esm/node/oidc/util/oauthMeta.js +38 -0
- package/esm/node/oidc/util/oauthMeta.js.map +1 -0
- package/esm/node/oidc/util/pkce.js +48 -0
- package/esm/node/oidc/util/pkce.js.map +1 -0
- package/esm/node/oidc/util/prepareTokenParams.js +65 -0
- package/esm/node/oidc/util/prepareTokenParams.js.map +1 -0
- package/esm/node/oidc/util/refreshToken.js +33 -0
- package/esm/node/oidc/util/refreshToken.js.map +1 -0
- package/esm/node/oidc/util/urlParams.js +43 -0
- package/esm/node/oidc/util/urlParams.js.map +1 -0
- package/esm/node/oidc/util/validateClaims.js +48 -0
- package/esm/node/oidc/util/validateClaims.js.map +1 -0
- package/esm/node/oidc/util/validateToken.js +34 -0
- package/esm/node/oidc/util/validateToken.js.map +1 -0
- package/esm/node/oidc/verifyToken.js +55 -0
- package/esm/node/oidc/verifyToken.js.map +1 -0
- package/esm/node/options/index.js +85 -0
- package/esm/node/options/index.js.map +1 -0
- package/esm/node/options/node.js +41 -0
- package/esm/node/options/node.js.map +1 -0
- package/esm/node/server/serverStorage.js +82 -0
- package/esm/node/server/serverStorage.js.map +1 -0
- package/esm/node/services/AutoRenewService.js +77 -0
- package/esm/node/services/AutoRenewService.js.map +1 -0
- package/esm/node/services/LeaderElectionService.js +74 -0
- package/esm/node/services/LeaderElectionService.js.map +1 -0
- package/esm/node/services/SyncStorageService.js +130 -0
- package/esm/node/services/SyncStorageService.js.map +1 -0
- package/esm/node/session.js +66 -0
- package/esm/node/session.js.map +1 -0
- package/esm/node/tx/AuthTransaction.js +174 -0
- package/esm/node/tx/AuthTransaction.js.map +1 -0
- package/esm/node/tx/api.js +72 -0
- package/esm/node/tx/api.js.map +1 -0
- package/esm/node/tx/poll.js +117 -0
- package/esm/node/tx/poll.js.map +1 -0
- package/esm/node/tx/util.js +26 -0
- package/esm/node/tx/util.js.map +1 -0
- package/esm/node/types/Token.js +32 -0
- package/esm/node/types/Token.js.map +1 -0
- package/esm/node/types/TokenManager.js +21 -0
- package/esm/node/types/TokenManager.js.map +1 -0
- package/esm/node/types/Transaction.js +52 -0
- package/esm/node/types/Transaction.js.map +1 -0
- package/esm/node/util/console.js +50 -0
- package/esm/node/util/console.js.map +1 -0
- package/esm/node/util/misc.js +39 -0
- package/esm/node/util/misc.js.map +1 -0
- package/esm/node/util/object.js +98 -0
- package/esm/node/util/object.js.map +1 -0
- package/esm/node/util/sharedStorage.js +56 -0
- package/esm/node/util/sharedStorage.js.map +1 -0
- package/esm/node/util/types.js +30 -0
- package/esm/node/util/types.js.map +1 -0
- package/esm/node/util/url.js +57 -0
- package/esm/node/util/url.js.map +1 -0
- package/esm/package.json +3 -0
- package/lib/SavedObject.d.ts +1 -0
- package/lib/ServiceManager.d.ts +1 -7
- package/lib/TokenManager.d.ts +12 -10
- package/lib/cdnEntry.d.ts +18 -0
- package/lib/errors/AuthApiError.d.ts +2 -1
- package/lib/idx/idxState/v1/idxResponseParser.d.ts +2 -2
- package/lib/idx/types/idx-js.d.ts +12 -0
- package/lib/idx/util.d.ts +3 -3
- package/lib/myaccount/api.d.ts +14 -0
- package/lib/myaccount/emailApi.d.ts +29 -0
- package/lib/myaccount/index.d.ts +13 -0
- package/lib/myaccount/phoneApi.d.ts +25 -0
- package/lib/myaccount/profileApi.d.ts +13 -0
- package/lib/myaccount/request.d.ts +29 -0
- package/lib/myaccount/transactions/Base.d.ts +15 -0
- package/lib/myaccount/transactions/EmailChallengeTransaction.d.ts +12 -0
- package/lib/myaccount/transactions/EmailStatusTransaction.d.ts +9 -0
- package/lib/myaccount/transactions/EmailTransaction.d.ts +15 -0
- package/lib/myaccount/transactions/PhoneTransaction.d.ts +12 -0
- package/lib/myaccount/transactions/ProfileSchemaTransaction.d.ts +5 -0
- package/lib/myaccount/transactions/ProfileTransaction.d.ts +7 -0
- package/lib/myaccount/transactions/index.d.ts +7 -0
- package/lib/myaccount/types.d.ts +55 -0
- package/lib/services/AutoRenewService.d.ts +2 -2
- package/lib/services/LeaderElectionService.d.ts +33 -0
- package/lib/services/SyncStorageService.d.ts +17 -5
- package/lib/services/index.d.ts +1 -0
- package/lib/types/JWT.d.ts +4 -1
- package/lib/types/OktaAuthOptions.d.ts +4 -2
- package/lib/types/Service.d.ts +7 -4
- package/lib/types/Storage.d.ts +2 -0
- package/lib/types/TokenManager.d.ts +20 -4
- package/lib/types/api.d.ts +2 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/util/misc.d.ts +1 -0
- package/package.json +42 -18
- package/polyfill/index.js +7 -0
- package/esm/esm.browser.js +0 -9834
- package/esm/esm.browser.js.map +0 -1
- package/esm/esm.node.mjs +0 -9932
- package/esm/esm.node.mjs.map +0 -1
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { __rest } from './_virtual/_tslib.js';
|
|
14
|
+
import * as constants from './constants.js';
|
|
15
|
+
import { DEFAULT_MAX_CLOCK_SKEW, REFERRER_PATH_STORAGE_KEY } from './constants.js';
|
|
16
|
+
import { transactionStatus, resumeTransaction, transactionExists, introspectAuthn, postToTransaction } from './tx/api.js';
|
|
17
|
+
import { AuthTransaction } from './tx/AuthTransaction.js';
|
|
18
|
+
import { setRequestHeader } from './http/headers.js';
|
|
19
|
+
import { get, httpRequest } from './http/request.js';
|
|
20
|
+
import { clone } from './util/object.js';
|
|
21
|
+
import { toAbsoluteUrl, toQueryString } from './util/url.js';
|
|
22
|
+
import PKCE from './oidc/util/pkce.js';
|
|
23
|
+
import { closeSession, sessionExists, getSession, refreshSession, setCookieAndRedirect } from './session.js';
|
|
24
|
+
import { getOAuthUrls } from './oidc/util/oauth.js';
|
|
25
|
+
import * as features from './features.js';
|
|
26
|
+
import { isBrowser } from './features.js';
|
|
27
|
+
import { isInteractionRequiredError } from './oidc/util/errors.js';
|
|
28
|
+
import { isLoginRedirect, isInteractionRequired } from './oidc/util/loginRedirect.js';
|
|
29
|
+
import { prepareTokenParams } from './oidc/util/prepareTokenParams.js';
|
|
30
|
+
import './idx/types/api.js';
|
|
31
|
+
import './myaccount/types.js';
|
|
32
|
+
import { decodeToken } from './oidc/decodeToken.js';
|
|
33
|
+
import { revokeToken } from './oidc/revokeToken.js';
|
|
34
|
+
import { renewToken } from './oidc/renewToken.js';
|
|
35
|
+
import { renewTokensWithRefresh } from './oidc/renewTokensWithRefresh.js';
|
|
36
|
+
import { renewTokens } from './oidc/renewTokens.js';
|
|
37
|
+
import { verifyToken } from './oidc/verifyToken.js';
|
|
38
|
+
import { getUserInfo } from './oidc/getUserInfo.js';
|
|
39
|
+
import { exchangeCodeForTokens } from './oidc/exchangeCodeForTokens.js';
|
|
40
|
+
import { getWithoutPrompt } from './oidc/getWithoutPrompt.js';
|
|
41
|
+
import { getWithPopup } from './oidc/getWithPopup.js';
|
|
42
|
+
import { getWithRedirect } from './oidc/getWithRedirect.js';
|
|
43
|
+
import { parseFromUrl, parseOAuthResponseFromUrl } from './oidc/parseFromUrl.js';
|
|
44
|
+
import * as index from './crypto/index.js';
|
|
45
|
+
import * as webauthn from './crypto/webauthn.js';
|
|
46
|
+
import storageUtil from './browser/browserStorage.js';
|
|
47
|
+
import { TokenManager } from './TokenManager.js';
|
|
48
|
+
import { ServiceManager } from './ServiceManager.js';
|
|
49
|
+
import PromiseQueue from './PromiseQueue.js';
|
|
50
|
+
import fingerprint from './browser/fingerprint.js';
|
|
51
|
+
import { AuthStateManager } from './AuthStateManager.js';
|
|
52
|
+
import { StorageManager } from './StorageManager.js';
|
|
53
|
+
import TransactionManager from './TransactionManager.js';
|
|
54
|
+
import { buildOptions } from './options/index.js';
|
|
55
|
+
import { authenticate } from './idx/authenticate.js';
|
|
56
|
+
import { cancel } from './idx/cancel.js';
|
|
57
|
+
import { handleEmailVerifyCallback, isEmailVerifyCallback, parseEmailVerifyCallback, isEmailVerifyCallbackError } from './idx/emailVerify.js';
|
|
58
|
+
import { interact } from './idx/interact.js';
|
|
59
|
+
import { introspect } from './idx/introspect.js';
|
|
60
|
+
import { poll } from './idx/poll.js';
|
|
61
|
+
import { proceed, canProceed } from './idx/proceed.js';
|
|
62
|
+
import { register } from './idx/register.js';
|
|
63
|
+
import { recoverPassword } from './idx/recoverPassword.js';
|
|
64
|
+
import { handleInteractionCodeRedirect } from './idx/handleInteractionCodeRedirect.js';
|
|
65
|
+
import { startTransaction } from './idx/startTransaction.js';
|
|
66
|
+
import { unlockAccount } from './idx/unlockAccount.js';
|
|
67
|
+
import { getSavedTransactionMeta, createTransactionMeta, getTransactionMeta, saveTransactionMeta, clearTransactionMeta, isTransactionMetaValid } from './idx/transactionMeta.js';
|
|
68
|
+
import { OktaUserAgent } from './OktaUserAgent.js';
|
|
69
|
+
import Emitter from 'tiny-emitter';
|
|
70
|
+
import { makeIdxState } from './idx/idxState/index.js';
|
|
71
|
+
|
|
72
|
+
class OktaAuth {
|
|
73
|
+
constructor(args) {
|
|
74
|
+
this.features = features;
|
|
75
|
+
const options = this.options = buildOptions(args);
|
|
76
|
+
this.storageManager = new StorageManager(options.storageManager, options.cookies, options.storageUtil);
|
|
77
|
+
this.transactionManager = new TransactionManager(Object.assign({
|
|
78
|
+
storageManager: this.storageManager,
|
|
79
|
+
}, options.transactionManager));
|
|
80
|
+
this._oktaUserAgent = new OktaUserAgent();
|
|
81
|
+
this.tx = {
|
|
82
|
+
status: transactionStatus.bind(null, this),
|
|
83
|
+
resume: resumeTransaction.bind(null, this),
|
|
84
|
+
exists: Object.assign(transactionExists.bind(null, this), {
|
|
85
|
+
_get: (name) => {
|
|
86
|
+
const storage = options.storageUtil.storage;
|
|
87
|
+
return storage.get(name);
|
|
88
|
+
}
|
|
89
|
+
}),
|
|
90
|
+
introspect: introspectAuthn.bind(null, this),
|
|
91
|
+
createTransaction: (res) => {
|
|
92
|
+
return new AuthTransaction(this, res);
|
|
93
|
+
},
|
|
94
|
+
postToTransaction: (url, args, options) => {
|
|
95
|
+
return postToTransaction(this, url, args, options);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
this.pkce = {
|
|
99
|
+
DEFAULT_CODE_CHALLENGE_METHOD: PKCE.DEFAULT_CODE_CHALLENGE_METHOD,
|
|
100
|
+
generateVerifier: PKCE.generateVerifier,
|
|
101
|
+
computeChallenge: PKCE.computeChallenge
|
|
102
|
+
};
|
|
103
|
+
Object.assign(this.options.storageUtil || {}, {
|
|
104
|
+
getPKCEStorage: this.storageManager.getLegacyPKCEStorage.bind(this.storageManager),
|
|
105
|
+
getHttpCache: this.storageManager.getHttpCache.bind(this.storageManager),
|
|
106
|
+
});
|
|
107
|
+
this._pending = { handleLogin: false };
|
|
108
|
+
if (isBrowser()) {
|
|
109
|
+
this.options = Object.assign(this.options, {
|
|
110
|
+
redirectUri: toAbsoluteUrl(args.redirectUri, window.location.origin),
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
if (!args.maxClockSkew && args.maxClockSkew !== 0) {
|
|
114
|
+
this.options.maxClockSkew = DEFAULT_MAX_CLOCK_SKEW;
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
this.options.maxClockSkew = args.maxClockSkew;
|
|
118
|
+
}
|
|
119
|
+
this.options.ignoreLifetime = !!args.ignoreLifetime;
|
|
120
|
+
this.session = {
|
|
121
|
+
close: closeSession.bind(null, this),
|
|
122
|
+
exists: sessionExists.bind(null, this),
|
|
123
|
+
get: getSession.bind(null, this),
|
|
124
|
+
refresh: refreshSession.bind(null, this),
|
|
125
|
+
setCookieAndRedirect: setCookieAndRedirect.bind(null, this)
|
|
126
|
+
};
|
|
127
|
+
this._tokenQueue = new PromiseQueue();
|
|
128
|
+
const useQueue = (method) => {
|
|
129
|
+
return PromiseQueue.prototype.push.bind(this._tokenQueue, method, null);
|
|
130
|
+
};
|
|
131
|
+
const getWithRedirectFn = useQueue(getWithRedirect.bind(null, this));
|
|
132
|
+
const getWithRedirectApi = Object.assign(getWithRedirectFn, {
|
|
133
|
+
_setLocation: function (url) {
|
|
134
|
+
if (options.setLocation) {
|
|
135
|
+
options.setLocation(url);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
window.location = url;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
const parseFromUrlFn = useQueue(parseFromUrl.bind(null, this));
|
|
143
|
+
const parseFromUrlApi = Object.assign(parseFromUrlFn, {
|
|
144
|
+
_getHistory: function () {
|
|
145
|
+
return window.history;
|
|
146
|
+
},
|
|
147
|
+
_getLocation: function () {
|
|
148
|
+
return window.location;
|
|
149
|
+
},
|
|
150
|
+
_getDocument: function () {
|
|
151
|
+
return window.document;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
this.token = {
|
|
155
|
+
prepareTokenParams: prepareTokenParams.bind(null, this),
|
|
156
|
+
exchangeCodeForTokens: exchangeCodeForTokens.bind(null, this),
|
|
157
|
+
getWithoutPrompt: getWithoutPrompt.bind(null, this),
|
|
158
|
+
getWithPopup: getWithPopup.bind(null, this),
|
|
159
|
+
getWithRedirect: getWithRedirectApi,
|
|
160
|
+
parseFromUrl: parseFromUrlApi,
|
|
161
|
+
decode: decodeToken,
|
|
162
|
+
revoke: revokeToken.bind(null, this),
|
|
163
|
+
renew: renewToken.bind(null, this),
|
|
164
|
+
renewTokensWithRefresh: renewTokensWithRefresh.bind(null, this),
|
|
165
|
+
renewTokens: renewTokens.bind(null, this),
|
|
166
|
+
getUserInfo: (accessTokenObject, idTokenObject) => {
|
|
167
|
+
return getUserInfo(this, accessTokenObject, idTokenObject);
|
|
168
|
+
},
|
|
169
|
+
verify: verifyToken.bind(null, this),
|
|
170
|
+
isLoginRedirect: isLoginRedirect.bind(null, this)
|
|
171
|
+
};
|
|
172
|
+
const toWrap = [
|
|
173
|
+
'getWithoutPrompt',
|
|
174
|
+
'getWithPopup',
|
|
175
|
+
'revoke',
|
|
176
|
+
'renew',
|
|
177
|
+
'renewTokensWithRefresh',
|
|
178
|
+
'renewTokens'
|
|
179
|
+
];
|
|
180
|
+
toWrap.forEach(key => {
|
|
181
|
+
this.token[key] = useQueue(this.token[key]);
|
|
182
|
+
});
|
|
183
|
+
const boundStartTransaction = startTransaction.bind(null, this);
|
|
184
|
+
this.idx = {
|
|
185
|
+
interact: interact.bind(null, this),
|
|
186
|
+
introspect: introspect.bind(null, this),
|
|
187
|
+
makeIdxResponse: makeIdxState.bind(null, this),
|
|
188
|
+
authenticate: authenticate.bind(null, this),
|
|
189
|
+
register: register.bind(null, this),
|
|
190
|
+
start: boundStartTransaction,
|
|
191
|
+
startTransaction: boundStartTransaction,
|
|
192
|
+
poll: poll.bind(null, this),
|
|
193
|
+
proceed: proceed.bind(null, this),
|
|
194
|
+
cancel: cancel.bind(null, this),
|
|
195
|
+
recoverPassword: recoverPassword.bind(null, this),
|
|
196
|
+
handleInteractionCodeRedirect: handleInteractionCodeRedirect.bind(null, this),
|
|
197
|
+
isInteractionRequired: isInteractionRequired.bind(null, this),
|
|
198
|
+
isInteractionRequiredError,
|
|
199
|
+
handleEmailVerifyCallback: handleEmailVerifyCallback.bind(null, this),
|
|
200
|
+
isEmailVerifyCallback,
|
|
201
|
+
parseEmailVerifyCallback,
|
|
202
|
+
isEmailVerifyCallbackError,
|
|
203
|
+
getSavedTransactionMeta: getSavedTransactionMeta.bind(null, this),
|
|
204
|
+
createTransactionMeta: createTransactionMeta.bind(null, this),
|
|
205
|
+
getTransactionMeta: getTransactionMeta.bind(null, this),
|
|
206
|
+
saveTransactionMeta: saveTransactionMeta.bind(null, this),
|
|
207
|
+
clearTransactionMeta: clearTransactionMeta.bind(null, this),
|
|
208
|
+
isTransactionMetaValid,
|
|
209
|
+
setFlow: (flow) => {
|
|
210
|
+
this.options.flow = flow;
|
|
211
|
+
},
|
|
212
|
+
getFlow: () => {
|
|
213
|
+
return this.options.flow;
|
|
214
|
+
},
|
|
215
|
+
canProceed: canProceed.bind(null, this),
|
|
216
|
+
unlockAccount: unlockAccount.bind(null, this),
|
|
217
|
+
};
|
|
218
|
+
this.http = {
|
|
219
|
+
setRequestHeader: setRequestHeader.bind(null, this)
|
|
220
|
+
};
|
|
221
|
+
this.fingerprint = fingerprint.bind(null, this);
|
|
222
|
+
this.emitter = new Emitter();
|
|
223
|
+
this.tokenManager = new TokenManager(this, args.tokenManager);
|
|
224
|
+
this.authStateManager = new AuthStateManager(this);
|
|
225
|
+
if (!this.tokenManager.hasSharedStorage()) {
|
|
226
|
+
args.services = Object.assign(Object.assign({}, args.services), { syncStorage: false });
|
|
227
|
+
}
|
|
228
|
+
this.serviceManager = new ServiceManager(this, args.services);
|
|
229
|
+
}
|
|
230
|
+
async start() {
|
|
231
|
+
await this.serviceManager.start();
|
|
232
|
+
this.tokenManager.start();
|
|
233
|
+
if (!this.token.isLoginRedirect()) {
|
|
234
|
+
await this.authStateManager.updateAuthState();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
async stop() {
|
|
238
|
+
this.tokenManager.stop();
|
|
239
|
+
await this.serviceManager.stop();
|
|
240
|
+
}
|
|
241
|
+
setHeaders(headers) {
|
|
242
|
+
this.options.headers = Object.assign({}, this.options.headers, headers);
|
|
243
|
+
}
|
|
244
|
+
async signIn(opts) {
|
|
245
|
+
return this.signInWithCredentials(opts);
|
|
246
|
+
}
|
|
247
|
+
async signInWithCredentials(opts) {
|
|
248
|
+
opts = clone(opts || {});
|
|
249
|
+
const _postToTransaction = (options) => {
|
|
250
|
+
delete opts.sendFingerprint;
|
|
251
|
+
return postToTransaction(this, '/api/v1/authn', opts, options);
|
|
252
|
+
};
|
|
253
|
+
if (!opts.sendFingerprint) {
|
|
254
|
+
return _postToTransaction();
|
|
255
|
+
}
|
|
256
|
+
return this.fingerprint()
|
|
257
|
+
.then(function (fingerprint) {
|
|
258
|
+
return _postToTransaction({
|
|
259
|
+
headers: {
|
|
260
|
+
'X-Device-Fingerprint': fingerprint
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
async signInWithRedirect(opts = {}) {
|
|
266
|
+
const { originalUri } = opts, additionalParams = __rest(opts, ["originalUri"]);
|
|
267
|
+
if (this._pending.handleLogin) {
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
this._pending.handleLogin = true;
|
|
271
|
+
try {
|
|
272
|
+
if (originalUri) {
|
|
273
|
+
this.setOriginalUri(originalUri);
|
|
274
|
+
}
|
|
275
|
+
const params = Object.assign({
|
|
276
|
+
scopes: this.options.scopes || ['openid', 'email', 'profile']
|
|
277
|
+
}, additionalParams);
|
|
278
|
+
await this.token.getWithRedirect(params);
|
|
279
|
+
}
|
|
280
|
+
finally {
|
|
281
|
+
this._pending.handleLogin = false;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
closeSession() {
|
|
285
|
+
return this.session.close()
|
|
286
|
+
.then(async () => {
|
|
287
|
+
this.tokenManager.clear();
|
|
288
|
+
})
|
|
289
|
+
.catch(function (e) {
|
|
290
|
+
if (e.name === 'AuthApiError' && e.errorCode === 'E0000007') {
|
|
291
|
+
return null;
|
|
292
|
+
}
|
|
293
|
+
throw e;
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
async revokeAccessToken(accessToken) {
|
|
297
|
+
if (!accessToken) {
|
|
298
|
+
accessToken = (await this.tokenManager.getTokens()).accessToken;
|
|
299
|
+
const accessTokenKey = this.tokenManager.getStorageKeyByType('accessToken');
|
|
300
|
+
this.tokenManager.remove(accessTokenKey);
|
|
301
|
+
}
|
|
302
|
+
if (!accessToken) {
|
|
303
|
+
return Promise.resolve(null);
|
|
304
|
+
}
|
|
305
|
+
return this.token.revoke(accessToken);
|
|
306
|
+
}
|
|
307
|
+
async revokeRefreshToken(refreshToken) {
|
|
308
|
+
if (!refreshToken) {
|
|
309
|
+
refreshToken = (await this.tokenManager.getTokens()).refreshToken;
|
|
310
|
+
const refreshTokenKey = this.tokenManager.getStorageKeyByType('refreshToken');
|
|
311
|
+
this.tokenManager.remove(refreshTokenKey);
|
|
312
|
+
}
|
|
313
|
+
if (!refreshToken) {
|
|
314
|
+
return Promise.resolve(null);
|
|
315
|
+
}
|
|
316
|
+
return this.token.revoke(refreshToken);
|
|
317
|
+
}
|
|
318
|
+
getSignOutRedirectUrl(options = {}) {
|
|
319
|
+
let { idToken, postLogoutRedirectUri, state, } = options;
|
|
320
|
+
if (!idToken) {
|
|
321
|
+
idToken = this.tokenManager.getTokensSync().idToken;
|
|
322
|
+
}
|
|
323
|
+
if (!idToken) {
|
|
324
|
+
return '';
|
|
325
|
+
}
|
|
326
|
+
if (!postLogoutRedirectUri) {
|
|
327
|
+
postLogoutRedirectUri = this.options.postLogoutRedirectUri;
|
|
328
|
+
}
|
|
329
|
+
const logoutUrl = getOAuthUrls(this).logoutUrl;
|
|
330
|
+
const idTokenHint = idToken.idToken;
|
|
331
|
+
let logoutUri = logoutUrl + '?id_token_hint=' + encodeURIComponent(idTokenHint);
|
|
332
|
+
if (postLogoutRedirectUri) {
|
|
333
|
+
logoutUri += '&post_logout_redirect_uri=' + encodeURIComponent(postLogoutRedirectUri);
|
|
334
|
+
}
|
|
335
|
+
if (state) {
|
|
336
|
+
logoutUri += '&state=' + encodeURIComponent(state);
|
|
337
|
+
}
|
|
338
|
+
return logoutUri;
|
|
339
|
+
}
|
|
340
|
+
async signOut(options) {
|
|
341
|
+
options = Object.assign({}, options);
|
|
342
|
+
var defaultUri = window.location.origin;
|
|
343
|
+
var currentUri = window.location.href;
|
|
344
|
+
var postLogoutRedirectUri = options.postLogoutRedirectUri
|
|
345
|
+
|| this.options.postLogoutRedirectUri
|
|
346
|
+
|| defaultUri;
|
|
347
|
+
var accessToken = options.accessToken;
|
|
348
|
+
var refreshToken = options.refreshToken;
|
|
349
|
+
var revokeAccessToken = options.revokeAccessToken !== false;
|
|
350
|
+
var revokeRefreshToken = options.revokeRefreshToken !== false;
|
|
351
|
+
if (revokeRefreshToken && typeof refreshToken === 'undefined') {
|
|
352
|
+
refreshToken = this.tokenManager.getTokensSync().refreshToken;
|
|
353
|
+
}
|
|
354
|
+
if (revokeAccessToken && typeof accessToken === 'undefined') {
|
|
355
|
+
accessToken = this.tokenManager.getTokensSync().accessToken;
|
|
356
|
+
}
|
|
357
|
+
if (!options.idToken) {
|
|
358
|
+
options.idToken = this.tokenManager.getTokensSync().idToken;
|
|
359
|
+
}
|
|
360
|
+
if (revokeRefreshToken && refreshToken) {
|
|
361
|
+
await this.revokeRefreshToken(refreshToken);
|
|
362
|
+
}
|
|
363
|
+
if (revokeAccessToken && accessToken) {
|
|
364
|
+
await this.revokeAccessToken(accessToken);
|
|
365
|
+
}
|
|
366
|
+
const logoutUri = this.getSignOutRedirectUrl(Object.assign(Object.assign({}, options), { postLogoutRedirectUri }));
|
|
367
|
+
if (!logoutUri) {
|
|
368
|
+
return this.closeSession()
|
|
369
|
+
.then(function () {
|
|
370
|
+
if (postLogoutRedirectUri === currentUri) {
|
|
371
|
+
window.location.reload();
|
|
372
|
+
}
|
|
373
|
+
else {
|
|
374
|
+
window.location.assign(postLogoutRedirectUri);
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
if (options.clearTokensBeforeRedirect) {
|
|
380
|
+
this.tokenManager.clear();
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
383
|
+
this.tokenManager.addPendingRemoveFlags();
|
|
384
|
+
}
|
|
385
|
+
window.location.assign(logoutUri);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
webfinger(opts) {
|
|
389
|
+
var url = '/.well-known/webfinger' + toQueryString(opts);
|
|
390
|
+
var options = {
|
|
391
|
+
headers: {
|
|
392
|
+
'Accept': 'application/jrd+json'
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
return get(this, url, options);
|
|
396
|
+
}
|
|
397
|
+
async isAuthenticated(options = {}) {
|
|
398
|
+
const { autoRenew, autoRemove } = this.tokenManager.getOptions();
|
|
399
|
+
const shouldRenew = options.onExpiredToken ? options.onExpiredToken === 'renew' : autoRenew;
|
|
400
|
+
const shouldRemove = options.onExpiredToken ? options.onExpiredToken === 'remove' : autoRemove;
|
|
401
|
+
let { accessToken } = this.tokenManager.getTokensSync();
|
|
402
|
+
if (accessToken && this.tokenManager.hasExpired(accessToken)) {
|
|
403
|
+
accessToken = undefined;
|
|
404
|
+
if (shouldRenew) {
|
|
405
|
+
try {
|
|
406
|
+
accessToken = await this.tokenManager.renew('accessToken');
|
|
407
|
+
}
|
|
408
|
+
catch (_a) {
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
else if (shouldRemove) {
|
|
412
|
+
this.tokenManager.remove('accessToken');
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
let { idToken } = this.tokenManager.getTokensSync();
|
|
416
|
+
if (idToken && this.tokenManager.hasExpired(idToken)) {
|
|
417
|
+
idToken = undefined;
|
|
418
|
+
if (shouldRenew) {
|
|
419
|
+
try {
|
|
420
|
+
idToken = await this.tokenManager.renew('idToken');
|
|
421
|
+
}
|
|
422
|
+
catch (_b) {
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
else if (shouldRemove) {
|
|
426
|
+
this.tokenManager.remove('idToken');
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
return !!(accessToken && idToken);
|
|
430
|
+
}
|
|
431
|
+
async getUser() {
|
|
432
|
+
const { idToken, accessToken } = this.tokenManager.getTokensSync();
|
|
433
|
+
return this.token.getUserInfo(accessToken, idToken);
|
|
434
|
+
}
|
|
435
|
+
getIdToken() {
|
|
436
|
+
const { idToken } = this.tokenManager.getTokensSync();
|
|
437
|
+
return idToken ? idToken.idToken : undefined;
|
|
438
|
+
}
|
|
439
|
+
getAccessToken() {
|
|
440
|
+
const { accessToken } = this.tokenManager.getTokensSync();
|
|
441
|
+
return accessToken ? accessToken.accessToken : undefined;
|
|
442
|
+
}
|
|
443
|
+
getRefreshToken() {
|
|
444
|
+
const { refreshToken } = this.tokenManager.getTokensSync();
|
|
445
|
+
return refreshToken ? refreshToken.refreshToken : undefined;
|
|
446
|
+
}
|
|
447
|
+
async storeTokensFromRedirect() {
|
|
448
|
+
const { tokens } = await this.token.parseFromUrl();
|
|
449
|
+
this.tokenManager.setTokens(tokens);
|
|
450
|
+
}
|
|
451
|
+
setOriginalUri(originalUri, state) {
|
|
452
|
+
const sessionStorage = storageUtil.getSessionStorage();
|
|
453
|
+
sessionStorage.setItem(REFERRER_PATH_STORAGE_KEY, originalUri);
|
|
454
|
+
state = state || this.options.state;
|
|
455
|
+
if (state) {
|
|
456
|
+
const sharedStorage = this.storageManager.getOriginalUriStorage();
|
|
457
|
+
sharedStorage.setItem(state, originalUri);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
getOriginalUri(state) {
|
|
461
|
+
state = state || this.options.state;
|
|
462
|
+
if (state) {
|
|
463
|
+
const sharedStorage = this.storageManager.getOriginalUriStorage();
|
|
464
|
+
const originalUri = sharedStorage.getItem(state);
|
|
465
|
+
if (originalUri) {
|
|
466
|
+
return originalUri;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
const storage = storageUtil.getSessionStorage();
|
|
470
|
+
return storage ? storage.getItem(REFERRER_PATH_STORAGE_KEY) || undefined : undefined;
|
|
471
|
+
}
|
|
472
|
+
removeOriginalUri(state) {
|
|
473
|
+
const storage = storageUtil.getSessionStorage();
|
|
474
|
+
storage.removeItem(REFERRER_PATH_STORAGE_KEY);
|
|
475
|
+
state = state || this.options.state;
|
|
476
|
+
if (state) {
|
|
477
|
+
const sharedStorage = this.storageManager.getOriginalUriStorage();
|
|
478
|
+
sharedStorage.removeItem && sharedStorage.removeItem(state);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
isLoginRedirect() {
|
|
482
|
+
return isLoginRedirect(this);
|
|
483
|
+
}
|
|
484
|
+
async handleLoginRedirect(tokens, originalUri) {
|
|
485
|
+
let state = this.options.state;
|
|
486
|
+
if (tokens) {
|
|
487
|
+
this.tokenManager.setTokens(tokens);
|
|
488
|
+
originalUri = originalUri || this.getOriginalUri(this.options.state);
|
|
489
|
+
}
|
|
490
|
+
else if (this.isLoginRedirect()) {
|
|
491
|
+
try {
|
|
492
|
+
const oAuthResponse = await parseOAuthResponseFromUrl(this, {});
|
|
493
|
+
state = oAuthResponse.state;
|
|
494
|
+
originalUri = originalUri || this.getOriginalUri(state);
|
|
495
|
+
await this.storeTokensFromRedirect();
|
|
496
|
+
}
|
|
497
|
+
catch (e) {
|
|
498
|
+
await this.authStateManager.updateAuthState();
|
|
499
|
+
throw e;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
else {
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
await this.authStateManager.updateAuthState();
|
|
506
|
+
this.removeOriginalUri(state);
|
|
507
|
+
const { restoreOriginalUri } = this.options;
|
|
508
|
+
if (restoreOriginalUri) {
|
|
509
|
+
await restoreOriginalUri(this, originalUri);
|
|
510
|
+
}
|
|
511
|
+
else if (originalUri) {
|
|
512
|
+
window.location.replace(originalUri);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
isPKCE() {
|
|
516
|
+
return !!this.options.pkce;
|
|
517
|
+
}
|
|
518
|
+
hasResponseType(responseType) {
|
|
519
|
+
let hasResponseType = false;
|
|
520
|
+
if (Array.isArray(this.options.responseType) && this.options.responseType.length) {
|
|
521
|
+
hasResponseType = this.options.responseType.indexOf(responseType) >= 0;
|
|
522
|
+
}
|
|
523
|
+
else {
|
|
524
|
+
hasResponseType = this.options.responseType === responseType;
|
|
525
|
+
}
|
|
526
|
+
return hasResponseType;
|
|
527
|
+
}
|
|
528
|
+
isAuthorizationCodeFlow() {
|
|
529
|
+
return this.hasResponseType('code');
|
|
530
|
+
}
|
|
531
|
+
getIssuerOrigin() {
|
|
532
|
+
return this.options.issuer.split('/oauth2/')[0];
|
|
533
|
+
}
|
|
534
|
+
forgotPassword(opts) {
|
|
535
|
+
return postToTransaction(this, '/api/v1/authn/recovery/password', opts);
|
|
536
|
+
}
|
|
537
|
+
unlockAccount(opts) {
|
|
538
|
+
return postToTransaction(this, '/api/v1/authn/recovery/unlock', opts);
|
|
539
|
+
}
|
|
540
|
+
verifyRecoveryToken(opts) {
|
|
541
|
+
return postToTransaction(this, '/api/v1/authn/recovery/token', opts);
|
|
542
|
+
}
|
|
543
|
+
async invokeApiMethod(options) {
|
|
544
|
+
if (!options.accessToken) {
|
|
545
|
+
const accessToken = (await this.tokenManager.getTokens()).accessToken;
|
|
546
|
+
options.accessToken = accessToken === null || accessToken === void 0 ? void 0 : accessToken.accessToken;
|
|
547
|
+
}
|
|
548
|
+
return httpRequest(this, options);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
OktaAuth.features = features;
|
|
552
|
+
OktaAuth.crypto = index;
|
|
553
|
+
OktaAuth.webauthn = webauthn;
|
|
554
|
+
OktaAuth.features = OktaAuth.prototype.features = features;
|
|
555
|
+
Object.assign(OktaAuth, {
|
|
556
|
+
constants
|
|
557
|
+
});
|
|
558
|
+
|
|
559
|
+
export { OktaAuth as default };
|
|
560
|
+
//# sourceMappingURL=OktaAuth.js.map
|