@okta/okta-auth-js 5.5.0 → 5.9.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 +66 -4
- package/README.md +61 -15
- package/cjs/AuthStateManager.js +5 -0
- package/cjs/AuthStateManager.js.map +1 -1
- package/cjs/OktaAuth.js +78 -29
- package/cjs/OktaAuth.js.map +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/StorageManager.js +16 -0
- package/cjs/StorageManager.js.map +1 -1
- package/cjs/TransactionManager.js +49 -9
- package/cjs/TransactionManager.js.map +1 -1
- package/cjs/builderUtil.js +6 -0
- package/cjs/builderUtil.js.map +1 -1
- package/cjs/constants.js +5 -1
- package/cjs/constants.js.map +1 -1
- package/cjs/features.js +1 -1
- package/cjs/features.js.map +1 -1
- package/cjs/idx/authenticate.js +3 -18
- package/cjs/idx/authenticate.js.map +1 -1
- package/cjs/idx/flow/AuthenticationFlow.js +30 -0
- package/cjs/idx/flow/AuthenticationFlow.js.map +1 -0
- package/cjs/idx/{flowMonitors → flow}/AuthenticationFlowMonitor.js +0 -0
- package/cjs/idx/flow/AuthenticationFlowMonitor.js.map +1 -0
- package/cjs/idx/{flowMonitors → flow}/FlowMonitor.js +0 -0
- package/cjs/idx/flow/FlowMonitor.js.map +1 -0
- package/cjs/idx/flow/FlowSpecification.js +49 -0
- package/cjs/idx/flow/FlowSpecification.js.map +1 -0
- package/cjs/idx/flow/PasswordRecoveryFlow.js +28 -0
- package/cjs/idx/flow/PasswordRecoveryFlow.js.map +1 -0
- package/cjs/idx/{flowMonitors → flow}/PasswordRecoveryFlowMonitor.js +0 -0
- package/cjs/idx/flow/PasswordRecoveryFlowMonitor.js.map +1 -0
- package/{esm/crypto/browser.js → cjs/idx/flow/RegistrationFlow.js} +15 -12
- package/cjs/idx/flow/RegistrationFlow.js.map +1 -0
- package/cjs/idx/{flowMonitors → flow}/RegistrationFlowMonitor.js +0 -0
- package/cjs/idx/flow/RegistrationFlowMonitor.js.map +1 -0
- package/cjs/idx/flow/RemediationFlow.js +2 -0
- package/{esm/types/Cookies.js.map → cjs/idx/flow/RemediationFlow.js.map} +1 -1
- package/cjs/idx/flow/index.js +119 -0
- package/cjs/idx/flow/index.js.map +1 -0
- package/cjs/idx/index.js +26 -0
- package/cjs/idx/index.js.map +1 -1
- package/cjs/idx/interact.js +5 -2
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js +24 -7
- package/cjs/idx/introspect.js.map +1 -1
- package/cjs/idx/proceed.js +49 -0
- package/cjs/idx/proceed.js.map +1 -0
- package/cjs/idx/recoverPassword.js +3 -17
- package/cjs/idx/recoverPassword.js.map +1 -1
- package/cjs/idx/register.js +7 -16
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/remediate.js +46 -52
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js +7 -7
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js +13 -7
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js +6 -6
- package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js +18 -14
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/EnrollProfile.js +14 -0
- package/cjs/idx/remediators/EnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/Identify.js +7 -3
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/remediators/ReEnrollAuthenticator.js +1 -1
- package/cjs/idx/remediators/ReEnrollAuthenticator.js.map +1 -1
- package/cjs/idx/run.js +36 -8
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/startTransaction.js +2 -0
- package/cjs/idx/startTransaction.js.map +1 -1
- package/cjs/idx/transactionMeta.js +80 -40
- package/cjs/idx/transactionMeta.js.map +1 -1
- package/cjs/idx/types/FlowIdentifier.js +2 -0
- package/{esm/types/AuthState.js.map → cjs/idx/types/FlowIdentifier.js.map} +1 -1
- package/cjs/idx/types/idx-js.js +5 -0
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/types/index.js +33 -6
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/oidc/endpoints/authorize.js +4 -1
- package/cjs/oidc/endpoints/authorize.js.map +1 -1
- package/cjs/oidc/getToken.js +14 -9
- package/cjs/oidc/getToken.js.map +1 -1
- package/cjs/oidc/getWithPopup.js +9 -2
- package/cjs/oidc/getWithPopup.js.map +1 -1
- package/cjs/oidc/getWithRedirect.js.map +1 -1
- package/cjs/oidc/parseFromUrl.js +59 -20
- package/cjs/oidc/parseFromUrl.js.map +1 -1
- package/cjs/oidc/renewTokens.js +28 -5
- package/cjs/oidc/renewTokens.js.map +1 -1
- package/cjs/oidc/util/browser.js +1 -13
- package/cjs/oidc/util/browser.js.map +1 -1
- package/cjs/oidc/util/loginRedirect.js +9 -5
- package/cjs/oidc/util/loginRedirect.js.map +1 -1
- package/cjs/oidc/util/urlParams.js +1 -1
- package/cjs/oidc/util/urlParams.js.map +1 -1
- package/cjs/options.js +15 -2
- package/cjs/options.js.map +1 -1
- package/cjs/server/serverStorage.js +2 -1
- package/cjs/server/serverStorage.js.map +1 -1
- package/cjs/tx/AuthTransaction.js +1 -3
- package/cjs/tx/AuthTransaction.js.map +1 -1
- package/cjs/tx/api.js +3 -0
- package/cjs/tx/api.js.map +1 -1
- package/cjs/types/Transaction.js.map +1 -1
- package/{esm/clock.js → cjs/util/emailVerify.js} +14 -18
- package/cjs/util/emailVerify.js.map +1 -0
- package/cjs/util/index.js +13 -0
- package/cjs/util/index.js.map +1 -1
- package/cjs/util/sharedStorage.js +54 -0
- package/cjs/util/sharedStorage.js.map +1 -0
- package/dist/okta-auth-js.min.js +2 -74
- package/dist/okta-auth-js.min.js.LICENSE.txt +32 -0
- package/dist/okta-auth-js.min.js.map +1 -1
- package/dist/okta-auth-js.polyfill.js +2 -18
- package/{esm/crypto/webcrypto.js → dist/okta-auth-js.polyfill.js.LICENSE.txt} +8 -4
- package/dist/okta-auth-js.polyfill.js.map +1 -1
- package/dist/okta-auth-js.umd.js +2 -74
- package/dist/okta-auth-js.umd.js.LICENSE.txt +32 -0
- package/dist/okta-auth-js.umd.js.map +1 -1
- package/esm/index.js +8368 -16
- package/esm/index.js.map +1 -1
- package/lib/AuthStateManager.d.ts +4 -2
- package/lib/OktaAuth.d.ts +9 -5
- package/lib/StorageManager.d.ts +2 -0
- package/lib/TransactionManager.d.ts +6 -1
- package/lib/constants.d.ts +2 -0
- package/lib/crypto/base64.d.ts +2 -2
- package/lib/crypto/oidcHash.d.ts +1 -1
- package/lib/crypto/verifyToken.d.ts +1 -1
- package/{esm/oidc/endpoints/index.js → lib/idx/flow/AuthenticationFlow.d.ts} +3 -5
- package/lib/idx/{flowMonitors → flow}/AuthenticationFlowMonitor.d.ts +0 -0
- package/lib/idx/{flowMonitors → flow}/FlowMonitor.d.ts +0 -0
- package/lib/idx/flow/FlowSpecification.d.ts +10 -0
- package/{esm/crypto/index.js → lib/idx/flow/PasswordRecoveryFlow.d.ts} +3 -6
- package/lib/idx/{flowMonitors → flow}/PasswordRecoveryFlowMonitor.d.ts +0 -0
- package/{esm/tx/TransactionState.js → lib/idx/flow/RegistrationFlow.d.ts} +3 -3
- package/lib/idx/{flowMonitors → flow}/RegistrationFlowMonitor.d.ts +0 -0
- package/lib/idx/flow/RemediationFlow.d.ts +13 -0
- package/lib/idx/{flowMonitors → flow}/index.d.ts +7 -2
- package/lib/idx/index.d.ts +2 -0
- package/lib/idx/introspect.d.ts +2 -1
- package/{esm/errors/AuthApiError.js → lib/idx/proceed.d.ts} +9 -19
- package/lib/idx/remediators/Base/AuthenticatorData.d.ts +2 -5
- package/lib/idx/remediators/Base/Remediator.d.ts +3 -6
- package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +3 -6
- package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +1 -1
- package/lib/idx/remediators/EnrollProfile.d.ts +1 -0
- package/lib/idx/remediators/Identify.d.ts +2 -5
- package/lib/idx/run.d.ts +9 -9
- package/lib/idx/transactionMeta.d.ts +28 -4
- package/lib/idx/types/FlowIdentifier.d.ts +1 -0
- package/lib/idx/types/idx-js.d.ts +5 -0
- package/lib/idx/types/index.d.ts +28 -10
- package/lib/oidc/getToken.d.ts +2 -2
- package/lib/oidc/parseFromUrl.d.ts +4 -1
- package/lib/oidc/renewTokens.d.ts +0 -12
- package/lib/oidc/util/loginRedirect.d.ts +1 -1
- package/lib/types/AuthState.d.ts +1 -0
- package/lib/types/OktaAuthOptions.d.ts +3 -1
- package/lib/types/Transaction.d.ts +7 -1
- package/lib/types/api.d.ts +21 -5
- package/{esm/errors/AuthPollStopError.js → lib/util/emailVerify.d.ts} +5 -8
- package/lib/util/index.d.ts +1 -0
- package/lib/util/sharedStorage.d.ts +6 -0
- package/package.json +26 -13
- package/cjs/idx/flowMonitors/AuthenticationFlowMonitor.js.map +0 -1
- package/cjs/idx/flowMonitors/FlowMonitor.js.map +0 -1
- package/cjs/idx/flowMonitors/PasswordRecoveryFlowMonitor.js.map +0 -1
- package/cjs/idx/flowMonitors/RegistrationFlowMonitor.js.map +0 -1
- package/cjs/idx/flowMonitors/index.js +0 -54
- package/cjs/idx/flowMonitors/index.js.map +0 -1
- package/esm/AuthStateManager.js +0 -209
- package/esm/AuthStateManager.js.map +0 -1
- package/esm/OktaAuth.js +0 -665
- package/esm/OktaAuth.js.map +0 -1
- package/esm/OktaUserAgent.js +0 -49
- package/esm/OktaUserAgent.js.map +0 -1
- package/esm/PromiseQueue.js +0 -71
- package/esm/PromiseQueue.js.map +0 -1
- package/esm/SavedObject.js +0 -91
- package/esm/SavedObject.js.map +0 -1
- package/esm/StorageManager.js +0 -174
- package/esm/StorageManager.js.map +0 -1
- package/esm/TokenManager.js +0 -455
- package/esm/TokenManager.js.map +0 -1
- package/esm/TransactionManager.js +0 -289
- package/esm/TransactionManager.js.map +0 -1
- package/esm/browser/browserStorage.js +0 -256
- package/esm/browser/browserStorage.js.map +0 -1
- package/esm/browser/fingerprint.js +0 -74
- package/esm/browser/fingerprint.js.map +0 -1
- package/esm/builderUtil.js +0 -50
- package/esm/builderUtil.js.map +0 -1
- package/esm/clock.js.map +0 -1
- package/esm/constants.js +0 -34
- package/esm/constants.js.map +0 -1
- package/esm/crypto/base64.js +0 -66
- package/esm/crypto/base64.js.map +0 -1
- package/esm/crypto/browser.js.map +0 -1
- package/esm/crypto/index.js.map +0 -1
- package/esm/crypto/node.js +0 -54
- package/esm/crypto/node.js.map +0 -1
- package/esm/crypto/oidcHash.js +0 -27
- package/esm/crypto/oidcHash.js.map +0 -1
- package/esm/crypto/verifyToken.js +0 -39
- package/esm/crypto/verifyToken.js.map +0 -1
- package/esm/crypto/webcrypto.js.map +0 -1
- package/esm/errors/AuthApiError.js.map +0 -1
- package/esm/errors/AuthPollStopError.js.map +0 -1
- package/esm/errors/AuthSdkError.js +0 -29
- package/esm/errors/AuthSdkError.js.map +0 -1
- package/esm/errors/CustomError.js +0 -21
- package/esm/errors/CustomError.js.map +0 -1
- package/esm/errors/OAuthError.js +0 -22
- package/esm/errors/OAuthError.js.map +0 -1
- package/esm/errors/index.js +0 -22
- package/esm/errors/index.js.map +0 -1
- package/esm/features.js +0 -64
- package/esm/features.js.map +0 -1
- package/esm/fetch/fetchRequest.js +0 -92
- package/esm/fetch/fetchRequest.js.map +0 -1
- package/esm/http/headers.js +0 -17
- package/esm/http/headers.js.map +0 -1
- package/esm/http/index.js +0 -3
- package/esm/http/index.js.map +0 -1
- package/esm/http/request.js +0 -145
- package/esm/http/request.js.map +0 -1
- package/esm/idx/authenticate.js +0 -47
- package/esm/idx/authenticate.js.map +0 -1
- package/esm/idx/cancel.js +0 -32
- package/esm/idx/cancel.js.map +0 -1
- package/esm/idx/flowMonitors/AuthenticationFlowMonitor.js +0 -41
- package/esm/idx/flowMonitors/AuthenticationFlowMonitor.js.map +0 -1
- package/esm/idx/flowMonitors/FlowMonitor.js +0 -73
- package/esm/idx/flowMonitors/FlowMonitor.js.map +0 -1
- package/esm/idx/flowMonitors/PasswordRecoveryFlowMonitor.js +0 -57
- package/esm/idx/flowMonitors/PasswordRecoveryFlowMonitor.js.map +0 -1
- package/esm/idx/flowMonitors/RegistrationFlowMonitor.js +0 -28
- package/esm/idx/flowMonitors/RegistrationFlowMonitor.js.map +0 -1
- package/esm/idx/flowMonitors/index.js +0 -16
- package/esm/idx/flowMonitors/index.js.map +0 -1
- package/esm/idx/handleInteractionCodeRedirect.js +0 -64
- package/esm/idx/handleInteractionCodeRedirect.js.map +0 -1
- package/esm/idx/headers.js +0 -39
- package/esm/idx/headers.js.map +0 -1
- package/esm/idx/index.js +0 -20
- package/esm/idx/index.js.map +0 -1
- package/esm/idx/interact.js +0 -83
- package/esm/idx/interact.js.map +0 -1
- package/esm/idx/introspect.js +0 -45
- package/esm/idx/introspect.js.map +0 -1
- package/esm/idx/recoverPassword.js +0 -46
- package/esm/idx/recoverPassword.js.map +0 -1
- package/esm/idx/register.js +0 -63
- package/esm/idx/register.js.map +0 -1
- package/esm/idx/remediate.js +0 -303
- package/esm/idx/remediate.js.map +0 -1
- package/esm/idx/remediators/AuthenticatorEnrollmentData.js +0 -68
- package/esm/idx/remediators/AuthenticatorEnrollmentData.js.map +0 -1
- package/esm/idx/remediators/AuthenticatorVerificationData.js +0 -66
- package/esm/idx/remediators/AuthenticatorVerificationData.js.map +0 -1
- package/esm/idx/remediators/Base/AuthenticatorData.js +0 -105
- package/esm/idx/remediators/Base/AuthenticatorData.js.map +0 -1
- package/esm/idx/remediators/Base/Remediator.js +0 -216
- package/esm/idx/remediators/Base/Remediator.js.map +0 -1
- package/esm/idx/remediators/Base/SelectAuthenticator.js +0 -140
- package/esm/idx/remediators/Base/SelectAuthenticator.js.map +0 -1
- package/esm/idx/remediators/Base/VerifyAuthenticator.js +0 -62
- package/esm/idx/remediators/Base/VerifyAuthenticator.js.map +0 -1
- package/esm/idx/remediators/ChallengeAuthenticator.js +0 -18
- package/esm/idx/remediators/ChallengeAuthenticator.js.map +0 -1
- package/esm/idx/remediators/EnrollAuthenticator.js +0 -18
- package/esm/idx/remediators/EnrollAuthenticator.js.map +0 -1
- package/esm/idx/remediators/EnrollProfile.js +0 -62
- package/esm/idx/remediators/EnrollProfile.js.map +0 -1
- package/esm/idx/remediators/Identify.js +0 -85
- package/esm/idx/remediators/Identify.js.map +0 -1
- package/esm/idx/remediators/ReEnrollAuthenticator.js +0 -45
- package/esm/idx/remediators/ReEnrollAuthenticator.js.map +0 -1
- package/esm/idx/remediators/RedirectIdp.js +0 -38
- package/esm/idx/remediators/RedirectIdp.js.map +0 -1
- package/esm/idx/remediators/ResetAuthenticator.js +0 -18
- package/esm/idx/remediators/ResetAuthenticator.js.map +0 -1
- package/esm/idx/remediators/SelectAuthenticatorAuthenticate.js +0 -18
- package/esm/idx/remediators/SelectAuthenticatorAuthenticate.js.map +0 -1
- package/esm/idx/remediators/SelectAuthenticatorEnroll.js +0 -18
- package/esm/idx/remediators/SelectAuthenticatorEnroll.js.map +0 -1
- package/esm/idx/remediators/SelectEnrollProfile.js +0 -24
- package/esm/idx/remediators/SelectEnrollProfile.js.map +0 -1
- package/esm/idx/remediators/Skip.js +0 -23
- package/esm/idx/remediators/Skip.js.map +0 -1
- package/esm/idx/remediators/index.js +0 -26
- package/esm/idx/remediators/index.js.map +0 -1
- package/esm/idx/remediators/util.js +0 -35
- package/esm/idx/remediators/util.js.map +0 -1
- package/esm/idx/run.js +0 -201
- package/esm/idx/run.js.map +0 -1
- package/esm/idx/startTransaction.js +0 -27
- package/esm/idx/startTransaction.js.map +0 -1
- package/esm/idx/transactionMeta.js +0 -112
- package/esm/idx/transactionMeta.js.map +0 -1
- package/esm/idx/types/idx-js.js +0 -17
- package/esm/idx/types/idx-js.js.map +0 -1
- package/esm/idx/types/index.js +0 -34
- package/esm/idx/types/index.js.map +0 -1
- package/esm/oidc/decodeToken.js +0 -31
- package/esm/oidc/decodeToken.js.map +0 -1
- package/esm/oidc/endpoints/authorize.js +0 -61
- package/esm/oidc/endpoints/authorize.js.map +0 -1
- package/esm/oidc/endpoints/index.js.map +0 -1
- package/esm/oidc/endpoints/token.js +0 -97
- package/esm/oidc/endpoints/token.js.map +0 -1
- package/esm/oidc/endpoints/well-known.js +0 -58
- package/esm/oidc/endpoints/well-known.js.map +0 -1
- package/esm/oidc/exchangeCodeForTokens.js +0 -69
- package/esm/oidc/exchangeCodeForTokens.js.map +0 -1
- package/esm/oidc/getToken.js +0 -175
- package/esm/oidc/getToken.js.map +0 -1
- package/esm/oidc/getUserInfo.js +0 -82
- package/esm/oidc/getUserInfo.js.map +0 -1
- package/esm/oidc/getWithPopup.js +0 -28
- package/esm/oidc/getWithPopup.js.map +0 -1
- package/esm/oidc/getWithRedirect.js +0 -61
- package/esm/oidc/getWithRedirect.js.map +0 -1
- package/esm/oidc/getWithoutPrompt.js +0 -29
- package/esm/oidc/getWithoutPrompt.js.map +0 -1
- package/esm/oidc/handleOAuthResponse.js +0 -148
- package/esm/oidc/handleOAuthResponse.js.map +0 -1
- package/esm/oidc/index.js +0 -29
- package/esm/oidc/index.js.map +0 -1
- package/esm/oidc/parseFromUrl.js +0 -102
- package/esm/oidc/parseFromUrl.js.map +0 -1
- package/esm/oidc/renewToken.js +0 -85
- package/esm/oidc/renewToken.js.map +0 -1
- package/esm/oidc/renewTokens.js +0 -52
- package/esm/oidc/renewTokens.js.map +0 -1
- package/esm/oidc/renewTokensWithRefresh.js +0 -55
- package/esm/oidc/renewTokensWithRefresh.js.map +0 -1
- package/esm/oidc/revokeToken.js +0 -57
- package/esm/oidc/revokeToken.js.map +0 -1
- package/esm/oidc/util/browser.js +0 -85
- package/esm/oidc/util/browser.js.map +0 -1
- package/esm/oidc/util/defaultTokenParams.js +0 -42
- package/esm/oidc/util/defaultTokenParams.js.map +0 -1
- package/esm/oidc/util/errors.js +0 -31
- package/esm/oidc/util/errors.js.map +0 -1
- package/esm/oidc/util/index.js +0 -25
- package/esm/oidc/util/index.js.map +0 -1
- package/esm/oidc/util/loginRedirect.js +0 -84
- package/esm/oidc/util/loginRedirect.js.map +0 -1
- package/esm/oidc/util/oauth.js +0 -70
- package/esm/oidc/util/oauth.js.map +0 -1
- package/esm/oidc/util/pkce.js +0 -55
- package/esm/oidc/util/pkce.js.map +0 -1
- package/esm/oidc/util/prepareTokenParams.js +0 -75
- package/esm/oidc/util/prepareTokenParams.js.map +0 -1
- package/esm/oidc/util/refreshToken.js +0 -24
- package/esm/oidc/util/refreshToken.js.map +0 -1
- package/esm/oidc/util/urlParams.js +0 -54
- package/esm/oidc/util/urlParams.js.map +0 -1
- package/esm/oidc/util/validateClaims.js +0 -53
- package/esm/oidc/util/validateClaims.js.map +0 -1
- package/esm/oidc/util/validateToken.js +0 -21
- package/esm/oidc/util/validateToken.js.map +0 -1
- package/esm/oidc/verifyToken.js +0 -78
- package/esm/oidc/verifyToken.js.map +0 -1
- package/esm/options.js +0 -131
- package/esm/options.js.map +0 -1
- package/esm/server/serverStorage.js +0 -110
- package/esm/server/serverStorage.js.map +0 -1
- package/esm/services/TokenService.js +0 -103
- package/esm/services/TokenService.js.map +0 -1
- package/esm/session.js +0 -81
- package/esm/session.js.map +0 -1
- package/esm/tx/AuthTransaction.js +0 -215
- package/esm/tx/AuthTransaction.js.map +0 -1
- package/esm/tx/TransactionState.js.map +0 -1
- package/esm/tx/api.js +0 -84
- package/esm/tx/api.js.map +0 -1
- package/esm/tx/index.js +0 -18
- package/esm/tx/index.js.map +0 -1
- package/esm/tx/poll.js +0 -124
- package/esm/tx/poll.js.map +0 -1
- package/esm/tx/util.js +0 -26
- package/esm/tx/util.js.map +0 -1
- package/esm/types/AuthState.js +0 -3
- package/esm/types/Cookies.js +0 -3
- package/esm/types/EventEmitter.js +0 -3
- package/esm/types/EventEmitter.js.map +0 -1
- package/esm/types/JWT.js +0 -3
- package/esm/types/JWT.js.map +0 -1
- package/esm/types/OAuth.js +0 -3
- package/esm/types/OAuth.js.map +0 -1
- package/esm/types/OktaAuthOptions.js +0 -3
- package/esm/types/OktaAuthOptions.js.map +0 -1
- package/esm/types/Storage.js +0 -3
- package/esm/types/Storage.js.map +0 -1
- package/esm/types/Token.js +0 -29
- package/esm/types/Token.js.map +0 -1
- package/esm/types/TokenManager.js +0 -3
- package/esm/types/TokenManager.js.map +0 -1
- package/esm/types/Transaction.js +0 -57
- package/esm/types/Transaction.js.map +0 -1
- package/esm/types/UserClaims.js +0 -3
- package/esm/types/UserClaims.js.map +0 -1
- package/esm/types/api.js +0 -3
- package/esm/types/api.js.map +0 -1
- package/esm/types/http.js +0 -3
- package/esm/types/http.js.map +0 -1
- package/esm/types/index.js +0 -27
- package/esm/types/index.js.map +0 -1
- package/esm/util/console.js +0 -53
- package/esm/util/console.js.map +0 -1
- package/esm/util/index.js +0 -17
- package/esm/util/index.js.map +0 -1
- package/esm/util/misc.js +0 -33
- package/esm/util/misc.js.map +0 -1
- package/esm/util/object.js +0 -117
- package/esm/util/object.js.map +0 -1
- package/esm/util/types.js +0 -27
- package/esm/util/types.js.map +0 -1
- package/esm/util/url.js +0 -64
- package/esm/util/url.js.map +0 -1
|
@@ -19,12 +19,14 @@ export declare class AuthStateManager {
|
|
|
19
19
|
updateAuthStatePromise: typeof PCancelable;
|
|
20
20
|
canceledTimes: number;
|
|
21
21
|
};
|
|
22
|
-
_authState: AuthState;
|
|
22
|
+
_authState: AuthState | null;
|
|
23
|
+
_prevAuthState: AuthState | null;
|
|
23
24
|
_logOptions: AuthStateLogOptions;
|
|
24
25
|
_lastEventTimestamp: number;
|
|
25
26
|
constructor(sdk: OktaAuth);
|
|
26
27
|
_setLogOptions(options: any): void;
|
|
27
|
-
getAuthState(): AuthState;
|
|
28
|
+
getAuthState(): AuthState | null;
|
|
29
|
+
getPreviousAuthState(): AuthState | null;
|
|
28
30
|
updateAuthState(): Promise<AuthState>;
|
|
29
31
|
subscribe(handler: any): void;
|
|
30
32
|
unsubscribe(handler?: any): void;
|
package/lib/OktaAuth.d.ts
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { OktaAuth as SDKInterface, OktaAuthOptions, AccessToken, RefreshToken, TokenAPI, FeaturesAPI, SignoutAPI, FingerprintAPI, UserClaims, SigninWithRedirectOptions, SigninWithCredentialsOptions, SignoutOptions, Tokens, ForgotPasswordOptions, VerifyRecoveryTokenOptions, TransactionAPI, SessionAPI, SigninAPI, PkceAPI, SigninOptions, IdxAPI, SignoutRedirectUrlOptions, HttpAPI } from './types';
|
|
13
13
|
import { AuthTransaction } from './tx';
|
|
14
|
+
import { EmailVerifyCallbackResponse } from './util';
|
|
14
15
|
import { TokenManager } from './TokenManager';
|
|
15
16
|
import PromiseQueue from './PromiseQueue';
|
|
16
17
|
import { AuthStateManager } from './AuthStateManager';
|
|
@@ -43,8 +44,11 @@ declare class OktaAuth implements SDKInterface, SigninAPI, SignoutAPI {
|
|
|
43
44
|
constructor(args: OktaAuthOptions);
|
|
44
45
|
start(): void;
|
|
45
46
|
stop(): void;
|
|
46
|
-
|
|
47
|
+
setHeaders(headers: any): void;
|
|
48
|
+
isInteractionRequired(hashOrSearch?: string): boolean;
|
|
47
49
|
isInteractionRequiredError(error: Error): boolean;
|
|
50
|
+
isEmailVerifyCallback(urlPath: string): boolean;
|
|
51
|
+
parseEmailVerifyCallback(urlPath: string): EmailVerifyCallbackResponse;
|
|
48
52
|
signIn(opts: SigninOptions): Promise<AuthTransaction>;
|
|
49
53
|
signInWithCredentials(opts: SigninWithCredentialsOptions): Promise<AuthTransaction>;
|
|
50
54
|
signInWithRedirect(opts?: SigninWithRedirectOptions): Promise<void>;
|
|
@@ -63,11 +67,11 @@ declare class OktaAuth implements SDKInterface, SigninAPI, SignoutAPI {
|
|
|
63
67
|
* Store parsed tokens from redirect url
|
|
64
68
|
*/
|
|
65
69
|
storeTokensFromRedirect(): Promise<void>;
|
|
66
|
-
setOriginalUri(originalUri: string): void;
|
|
67
|
-
getOriginalUri(): string;
|
|
68
|
-
removeOriginalUri(): void;
|
|
70
|
+
setOriginalUri(originalUri: string, state?: string): void;
|
|
71
|
+
getOriginalUri(state?: string): string;
|
|
72
|
+
removeOriginalUri(state?: string): void;
|
|
69
73
|
isLoginRedirect(): boolean;
|
|
70
|
-
handleLoginRedirect(tokens?: Tokens): Promise<void>;
|
|
74
|
+
handleLoginRedirect(tokens?: Tokens, originalUri?: string): Promise<void>;
|
|
71
75
|
isPKCE(): boolean;
|
|
72
76
|
hasResponseType(responseType: string): boolean;
|
|
73
77
|
isAuthorizationCodeFlow(): boolean;
|
package/lib/StorageManager.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export default class StorageManager {
|
|
|
18
18
|
getOptionsForSection(sectionName: string, overrideOptions?: StorageOptions): StorageOptions;
|
|
19
19
|
getStorage(options: StorageOptions): SimpleStorage;
|
|
20
20
|
getTransactionStorage(options?: StorageOptions): TransactionStorage;
|
|
21
|
+
getSharedTansactionStorage(options?: StorageOptions): TransactionStorage;
|
|
22
|
+
getOriginalUriStorage(options?: StorageOptions): TransactionStorage;
|
|
21
23
|
getIdxResponseStorage(options?: StorageOptions): IdxResponseStorage;
|
|
22
24
|
getTokenStorage(options?: StorageOptions): StorageProvider;
|
|
23
25
|
getHttpCache(options?: StorageOptions): StorageProvider;
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
import StorageManager from './StorageManager';
|
|
13
13
|
import { TransactionMeta, PKCETransactionMeta, OAuthTransactionMeta, TransactionMetaOptions, TransactionManagerOptions } from './types';
|
|
14
14
|
import { RawIdxResponse } from './idx/types/idx-js';
|
|
15
|
+
export interface ClearTransactionMetaOptions extends TransactionMetaOptions {
|
|
16
|
+
clearSharedStorage?: boolean;
|
|
17
|
+
}
|
|
15
18
|
export default class TransactionManager {
|
|
16
19
|
options: TransactionManagerOptions;
|
|
17
20
|
storageManager: StorageManager;
|
|
@@ -19,8 +22,9 @@ export default class TransactionManager {
|
|
|
19
22
|
saveNonceCookie: boolean;
|
|
20
23
|
saveStateCookie: boolean;
|
|
21
24
|
saveParamsCookie: boolean;
|
|
25
|
+
enableSharedStorage: boolean;
|
|
22
26
|
constructor(options: TransactionManagerOptions);
|
|
23
|
-
clear(options?:
|
|
27
|
+
clear(options?: ClearTransactionMetaOptions): void;
|
|
24
28
|
save(meta: TransactionMeta, options?: TransactionMetaOptions): void;
|
|
25
29
|
exists(options?: TransactionMetaOptions): boolean;
|
|
26
30
|
load(options?: TransactionMetaOptions): TransactionMeta;
|
|
@@ -30,4 +34,5 @@ export default class TransactionManager {
|
|
|
30
34
|
loadLegacyOAuthParams(): OAuthTransactionMeta;
|
|
31
35
|
saveIdxResponse(idxResponse: RawIdxResponse): void;
|
|
32
36
|
loadIdxResponse(): RawIdxResponse;
|
|
37
|
+
clearIdxResponse(): void;
|
|
33
38
|
}
|
package/lib/constants.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export declare const TOKEN_STORAGE_NAME = "okta-token-storage";
|
|
|
20
20
|
export declare const CACHE_STORAGE_NAME = "okta-cache-storage";
|
|
21
21
|
export declare const PKCE_STORAGE_NAME = "okta-pkce-storage";
|
|
22
22
|
export declare const TRANSACTION_STORAGE_NAME = "okta-transaction-storage";
|
|
23
|
+
export declare const SHARED_TRANSACTION_STORAGE_NAME = "okta-shared-transaction-storage";
|
|
24
|
+
export declare const ORIGINAL_URI_STORAGE_NAME = "okta-original-uri-storage";
|
|
23
25
|
export declare const IDX_RESPONSE_STORAGE_NAME = "okta-idx-response-storage";
|
|
24
26
|
export declare const ACCESS_TOKEN_STORAGE_KEY = "accessToken";
|
|
25
27
|
export declare const ID_TOKEN_STORAGE_KEY = "idToken";
|
package/lib/crypto/base64.d.ts
CHANGED
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
export declare function stringToBase64Url(str: any): any;
|
|
13
13
|
export declare function base64ToBase64Url(b64: any): any;
|
|
14
14
|
export declare function base64UrlToBase64(b64u: any): any;
|
|
15
|
-
export declare function base64UrlToString(b64u: any):
|
|
15
|
+
export declare function base64UrlToString(b64u: any): any;
|
|
16
16
|
export declare function stringToBuffer(str: any): Uint8Array;
|
|
17
|
-
export declare function base64UrlDecode(str: any):
|
|
17
|
+
export declare function base64UrlDecode(str: any): any;
|
package/lib/crypto/oidcHash.d.ts
CHANGED
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
* Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
8
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
export * from './well-known';
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
12
|
+
import { RemediationFlow } from './RemediationFlow';
|
|
13
|
+
export declare const AuthenticationFlow: RemediationFlow;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OktaAuth, FlowIdentifier } from '../../types';
|
|
2
|
+
import { FlowMonitor } from './FlowMonitor';
|
|
3
|
+
import { RemediationFlow } from './RemediationFlow';
|
|
4
|
+
export interface FlowSpecification {
|
|
5
|
+
flow: FlowIdentifier;
|
|
6
|
+
remediators: RemediationFlow;
|
|
7
|
+
flowMonitor: FlowMonitor;
|
|
8
|
+
actions?: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare function getFlowSpecification(oktaAuth: OktaAuth, flow?: FlowIdentifier): FlowSpecification;
|
|
@@ -6,11 +6,8 @@
|
|
|
6
6
|
* Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
8
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
export * from './verifyToken';
|
|
15
|
-
export * from './webcrypto';
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
12
|
+
import { RemediationFlow } from './RemediationFlow';
|
|
13
|
+
export declare const PasswordRecoveryFlow: RemediationFlow;
|
|
File without changes
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
8
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
import { RemediationFlow } from './RemediationFlow';
|
|
13
|
+
export declare const RegistrationFlow: RemediationFlow;
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
import * as remediators from '../remediators';
|
|
13
|
+
export declare type RemediationFlow = Record<string, typeof remediators.Remediator>;
|
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './RegistrationFlowMonitor';
|
|
12
|
+
export * from './AuthenticationFlow';
|
|
14
13
|
export * from './AuthenticationFlowMonitor';
|
|
14
|
+
export * from './FlowMonitor';
|
|
15
|
+
export * from './FlowSpecification';
|
|
16
|
+
export * from './PasswordRecoveryFlow';
|
|
15
17
|
export * from './PasswordRecoveryFlowMonitor';
|
|
18
|
+
export * from './RegistrationFlow';
|
|
19
|
+
export * from './RegistrationFlowMonitor';
|
|
20
|
+
export * from './RemediationFlow';
|
package/lib/idx/index.d.ts
CHANGED
|
@@ -13,7 +13,9 @@ export * from './authenticate';
|
|
|
13
13
|
export * from './cancel';
|
|
14
14
|
export * from './interact';
|
|
15
15
|
export * from './introspect';
|
|
16
|
+
export * from './proceed';
|
|
16
17
|
export * from './register';
|
|
17
18
|
export * from './recoverPassword';
|
|
18
19
|
export * from './handleInteractionCodeRedirect';
|
|
19
20
|
export * from './startTransaction';
|
|
21
|
+
export * from './transactionMeta';
|
package/lib/idx/introspect.d.ts
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
import { OktaAuth } from '../types';
|
|
13
13
|
import { IdxResponse } from './types/idx-js';
|
|
14
14
|
export interface IntrospectOptions {
|
|
15
|
-
interactionHandle
|
|
15
|
+
interactionHandle?: string;
|
|
16
16
|
stateHandle?: string;
|
|
17
|
+
stateTokenExternalId?: string;
|
|
17
18
|
}
|
|
18
19
|
export declare function introspect(authClient: OktaAuth, options: IntrospectOptions): Promise<IdxResponse>;
|
|
@@ -9,22 +9,12 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.errorId = err.errorId;
|
|
22
|
-
this.errorCauses = err.errorCauses;
|
|
23
|
-
|
|
24
|
-
if (xhr) {
|
|
25
|
-
this.xhr = xhr;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=AuthApiError.js.map
|
|
12
|
+
import { OktaAuth, IdxTransaction } from '../types';
|
|
13
|
+
import { AuthenticationOptions } from './authenticate';
|
|
14
|
+
import { RegistrationOptions } from './register';
|
|
15
|
+
import { PasswordRecoveryOptions } from './recoverPassword';
|
|
16
|
+
export declare type ProceedOptions = AuthenticationOptions & RegistrationOptions & PasswordRecoveryOptions;
|
|
17
|
+
export declare function canProceed(authClient: OktaAuth, options?: {
|
|
18
|
+
state?: string;
|
|
19
|
+
}): boolean;
|
|
20
|
+
export declare function proceed(authClient: OktaAuth, options?: ProceedOptions): Promise<IdxTransaction>;
|
|
@@ -24,13 +24,10 @@ export declare class AuthenticatorData extends Remediator {
|
|
|
24
24
|
getNextStep(): {
|
|
25
25
|
options: IdxOption[];
|
|
26
26
|
name: string;
|
|
27
|
-
|
|
27
|
+
authenticator?: import("../../types/idx-js").IdxAuthenticator;
|
|
28
28
|
canSkip?: boolean;
|
|
29
29
|
canResend?: boolean;
|
|
30
|
-
inputs?:
|
|
31
|
-
name: string;
|
|
32
|
-
required?: boolean;
|
|
33
|
-
}[];
|
|
30
|
+
inputs?: import("../../types").Input[];
|
|
34
31
|
};
|
|
35
32
|
protected getAuthenticatorFromValues(): Authenticator;
|
|
36
33
|
protected mapAuthenticatorFromValues(authenticator?: Authenticator): Authenticator;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { NextStep, IdxMessage, Authenticator } from '../../types';
|
|
13
|
-
import { IdxRemediation } from '../../types/idx-js';
|
|
13
|
+
import { IdxAuthenticator, IdxRemediation } from '../../types/idx-js';
|
|
14
14
|
export declare type IdxToRemediationValueMap = Record<string, string[]>;
|
|
15
15
|
export interface RemediationValues {
|
|
16
16
|
stateHandle?: string;
|
|
@@ -29,9 +29,6 @@ export declare class Remediator {
|
|
|
29
29
|
getNextStep(): NextStep;
|
|
30
30
|
private getInputs;
|
|
31
31
|
getMessages(): IdxMessage[] | undefined;
|
|
32
|
-
getValuesAfterProceed():
|
|
33
|
-
|
|
34
|
-
stateHandle?: string;
|
|
35
|
-
};
|
|
36
|
-
protected getRelatesToType(): string;
|
|
32
|
+
getValuesAfterProceed(): unknown;
|
|
33
|
+
protected getAuthenticator(): IdxAuthenticator | undefined;
|
|
37
34
|
}
|
|
@@ -28,19 +28,16 @@ export declare class SelectAuthenticator extends Remediator {
|
|
|
28
28
|
value: string;
|
|
29
29
|
}[];
|
|
30
30
|
name: string;
|
|
31
|
-
|
|
31
|
+
authenticator?: import("../../types/idx-js").IdxAuthenticator;
|
|
32
32
|
canSkip?: boolean;
|
|
33
33
|
canResend?: boolean;
|
|
34
|
-
inputs?:
|
|
35
|
-
name: string;
|
|
36
|
-
required?: boolean;
|
|
37
|
-
}[];
|
|
34
|
+
inputs?: import("../../types").Input[];
|
|
38
35
|
};
|
|
39
36
|
mapAuthenticator(remediationValue: IdxRemediationValue): {
|
|
40
37
|
id: any;
|
|
41
38
|
};
|
|
42
39
|
getInputAuthenticator(): {
|
|
43
40
|
name: string;
|
|
44
|
-
|
|
41
|
+
key: string;
|
|
45
42
|
};
|
|
46
43
|
}
|
|
@@ -15,7 +15,6 @@ export interface VerifyAuthenticatorValues extends RemediationValues {
|
|
|
15
15
|
password?: string;
|
|
16
16
|
}
|
|
17
17
|
export declare class VerifyAuthenticator extends Remediator {
|
|
18
|
-
static remediationName: string;
|
|
19
18
|
values: VerifyAuthenticatorValues;
|
|
20
19
|
map: {
|
|
21
20
|
credentials: any[];
|
|
@@ -25,4 +24,5 @@ export declare class VerifyAuthenticator extends Remediator {
|
|
|
25
24
|
passcode: string;
|
|
26
25
|
};
|
|
27
26
|
getInputCredentials(input: any): any;
|
|
27
|
+
getValuesAfterProceed(): VerifyAuthenticatorValues;
|
|
28
28
|
}
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { Remediator, RemediationValues } from './Base/Remediator';
|
|
13
|
-
import { Authenticator } from '../types';
|
|
14
13
|
import { IdxRemediation } from '../types/idx-js';
|
|
15
14
|
export interface IdentifyValues extends RemediationValues {
|
|
16
15
|
username?: string;
|
|
@@ -22,6 +21,7 @@ export declare class Identify extends Remediator {
|
|
|
22
21
|
map: {
|
|
23
22
|
identifier: string[];
|
|
24
23
|
credentials: any[];
|
|
24
|
+
rememberMe: string[];
|
|
25
25
|
};
|
|
26
26
|
constructor(remediation: IdxRemediation, values?: IdentifyValues);
|
|
27
27
|
canRemediate(): boolean;
|
|
@@ -29,8 +29,5 @@ export declare class Identify extends Remediator {
|
|
|
29
29
|
passcode: string;
|
|
30
30
|
};
|
|
31
31
|
getInputCredentials(input: any): any;
|
|
32
|
-
getValuesAfterProceed():
|
|
33
|
-
authenticators: Authenticator[];
|
|
34
|
-
stateHandle?: string;
|
|
35
|
-
};
|
|
32
|
+
getValuesAfterProceed(): unknown;
|
|
36
33
|
}
|
package/lib/idx/run.d.ts
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import { FlowMonitor } from './
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
export declare type
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
actions?: string[];
|
|
12
|
+
import { FlowMonitor, RemediationFlow } from './flow';
|
|
13
|
+
import { OktaAuth, IdxTransaction, FlowIdentifier } from '../types';
|
|
14
|
+
import { ProceedOptions } from './proceed';
|
|
15
|
+
export declare type RunOptions = ProceedOptions & {
|
|
16
|
+
flow?: FlowIdentifier;
|
|
17
|
+
remediators?: RemediationFlow;
|
|
19
18
|
flowMonitor?: FlowMonitor;
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
actions?: string[];
|
|
20
|
+
};
|
|
21
|
+
export declare function run(authClient: OktaAuth, options?: RunOptions): Promise<IdxTransaction>;
|
|
@@ -9,10 +9,34 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import { OktaAuth, IdxTransactionMeta } from '../types';
|
|
13
|
-
export declare function createTransactionMeta(authClient: OktaAuth): Promise<
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
import { OktaAuth, IdxTransactionMeta, TransactionMetaOptions } from '../types';
|
|
13
|
+
export declare function createTransactionMeta(authClient: OktaAuth, options?: TransactionMetaOptions): Promise<{
|
|
14
|
+
flow: import("./types/FlowIdentifier").FlowIdentifier;
|
|
15
|
+
issuer: string;
|
|
16
|
+
pkce: boolean;
|
|
17
|
+
clientId: string;
|
|
18
|
+
redirectUri: string;
|
|
19
|
+
responseType: string | string[];
|
|
20
|
+
responseMode: string;
|
|
21
|
+
scopes: string[];
|
|
22
|
+
state: string;
|
|
23
|
+
nonce: string;
|
|
24
|
+
urls: {
|
|
25
|
+
issuer: any;
|
|
26
|
+
authorizeUrl: any;
|
|
27
|
+
userinfoUrl: any;
|
|
28
|
+
tokenUrl: any;
|
|
29
|
+
revokeUrl: any;
|
|
30
|
+
logoutUrl: any;
|
|
31
|
+
};
|
|
32
|
+
ignoreSignature: boolean;
|
|
33
|
+
codeVerifier: string;
|
|
34
|
+
codeChallengeMethod: string;
|
|
35
|
+
codeChallenge: string;
|
|
36
|
+
}>;
|
|
37
|
+
export declare function transactionMetaExist(authClient: OktaAuth, options?: TransactionMetaOptions): boolean;
|
|
38
|
+
export declare function getSavedTransactionMeta(authClient: OktaAuth, options?: TransactionMetaOptions): IdxTransactionMeta;
|
|
39
|
+
export declare function getTransactionMeta(authClient: OktaAuth, options?: TransactionMetaOptions): Promise<IdxTransactionMeta>;
|
|
16
40
|
export declare function saveTransactionMeta(authClient: OktaAuth, meta: any): void;
|
|
17
41
|
export declare function clearTransactionMeta(authClient: OktaAuth): void;
|
|
18
42
|
export declare function isTransactionMetaValid(authClient: OktaAuth, meta: any): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type FlowIdentifier = 'default' | 'proceed' | 'authenticate' | 'login' | 'signin' | 'register' | 'signup' | 'enrollProfile' | 'recoverPassword' | 'resetPassword';
|
|
@@ -22,6 +22,7 @@ export interface IdxAuthenticator {
|
|
|
22
22
|
complexity?: unknown;
|
|
23
23
|
age?: unknown;
|
|
24
24
|
};
|
|
25
|
+
contextualData?: unknown;
|
|
25
26
|
}
|
|
26
27
|
export interface IdxForm {
|
|
27
28
|
value: IdxRemediationValue[];
|
|
@@ -42,6 +43,8 @@ export interface IdxRemediationValue {
|
|
|
42
43
|
type?: string;
|
|
43
44
|
required?: boolean;
|
|
44
45
|
secret?: boolean;
|
|
46
|
+
visible?: boolean;
|
|
47
|
+
mutable?: boolean;
|
|
45
48
|
value?: string;
|
|
46
49
|
label?: string;
|
|
47
50
|
form?: IdxForm;
|
|
@@ -62,6 +65,7 @@ export interface IdxRemediation {
|
|
|
62
65
|
href?: string;
|
|
63
66
|
method?: string;
|
|
64
67
|
type?: string;
|
|
68
|
+
accepts?: string;
|
|
65
69
|
}
|
|
66
70
|
export interface IdxMessage {
|
|
67
71
|
message: string;
|
|
@@ -100,3 +104,4 @@ export interface IdxResponse {
|
|
|
100
104
|
interactionHandle?: string;
|
|
101
105
|
};
|
|
102
106
|
}
|
|
107
|
+
export declare function isIdxResponse(obj: any): obj is IdxResponse;
|
package/lib/idx/types/index.d.ts
CHANGED
|
@@ -10,28 +10,43 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { InteractOptions } from '../interact';
|
|
13
|
+
import { IntrospectOptions } from '../introspect';
|
|
13
14
|
import { APIError, Tokens } from '../../types';
|
|
14
15
|
import { IdxTransactionMeta } from '../../types/Transaction';
|
|
15
|
-
import { IdxMessage, IdxOption } from './idx-js';
|
|
16
|
+
import { IdxAuthenticator, IdxMessage, IdxOption, IdxResponse } from './idx-js';
|
|
17
|
+
import { FlowIdentifier } from './FlowIdentifier';
|
|
16
18
|
export { IdxMessage } from './idx-js';
|
|
17
19
|
export { AuthenticationOptions } from '../authenticate';
|
|
18
20
|
export { RegistrationOptions } from '../register';
|
|
19
21
|
export { PasswordRecoveryOptions } from '../recoverPassword';
|
|
22
|
+
export { ProceedOptions } from '../proceed';
|
|
20
23
|
export { CancelOptions } from '../cancel';
|
|
24
|
+
export { FlowIdentifier };
|
|
21
25
|
export declare enum IdxStatus {
|
|
22
|
-
SUCCESS =
|
|
23
|
-
PENDING =
|
|
24
|
-
FAILURE =
|
|
25
|
-
TERMINAL =
|
|
26
|
-
CANCELED =
|
|
26
|
+
SUCCESS = "SUCCESS",
|
|
27
|
+
PENDING = "PENDING",
|
|
28
|
+
FAILURE = "FAILURE",
|
|
29
|
+
TERMINAL = "TERMINAL",
|
|
30
|
+
CANCELED = "CANCELED"
|
|
27
31
|
}
|
|
28
|
-
declare
|
|
32
|
+
export declare enum AuthenticatorKey {
|
|
33
|
+
OKTA_PASSWORD = "okta_password",
|
|
34
|
+
OKTA_EMAIL = "okta_email",
|
|
35
|
+
OKTA_VERIFIER = "okta_verifier",
|
|
36
|
+
PHONE_NUMBER = "phone_number",
|
|
37
|
+
GOOGLE_AUTHENTICATOR = "google_otp"
|
|
38
|
+
}
|
|
39
|
+
export declare type Input = {
|
|
29
40
|
name: string;
|
|
41
|
+
type?: string;
|
|
42
|
+
label?: string;
|
|
43
|
+
value?: string;
|
|
44
|
+
secret?: boolean;
|
|
30
45
|
required?: boolean;
|
|
31
46
|
};
|
|
32
47
|
export declare type NextStep = {
|
|
33
48
|
name: string;
|
|
34
|
-
|
|
49
|
+
authenticator?: IdxAuthenticator;
|
|
35
50
|
canSkip?: boolean;
|
|
36
51
|
canResend?: boolean;
|
|
37
52
|
inputs?: Input[];
|
|
@@ -51,10 +66,13 @@ export interface IdxTransaction {
|
|
|
51
66
|
meta?: IdxTransactionMeta;
|
|
52
67
|
enabledFeatures?: IdxFeature[];
|
|
53
68
|
availableSteps?: NextStep[];
|
|
69
|
+
_idxResponse?: IdxResponse;
|
|
54
70
|
}
|
|
55
|
-
export declare type IdxOptions = InteractOptions
|
|
71
|
+
export declare type IdxOptions = InteractOptions & IntrospectOptions & {
|
|
72
|
+
flow?: FlowIdentifier;
|
|
73
|
+
};
|
|
56
74
|
export declare type Authenticator = {
|
|
57
|
-
|
|
75
|
+
key: string;
|
|
58
76
|
methodType?: string;
|
|
59
77
|
phoneNumber?: string;
|
|
60
78
|
};
|
package/lib/oidc/getToken.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { OktaAuth, TokenParams } from '../types';
|
|
2
|
-
export declare function getToken(sdk: OktaAuth, options: TokenParams): Promise<import("../types").TokenResponse>;
|
|
1
|
+
import { OktaAuth, TokenParams, PopupParams } from '../types';
|
|
2
|
+
export declare function getToken(sdk: OktaAuth, options: TokenParams & PopupParams): Promise<import("../types").TokenResponse>;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import { ParseFromUrlOptions, TokenResponse } from '../types';
|
|
1
|
+
import { ParseFromUrlOptions, TokenResponse, OAuthResponse } from '../types';
|
|
2
|
+
export declare function getResponseMode(sdk: any): 'query' | 'fragment';
|
|
3
|
+
export declare function parseOAuthResponseFromUrl(sdk: any, options: string | ParseFromUrlOptions): OAuthResponse;
|
|
4
|
+
export declare function cleanOAuthResponseFromUrl(sdk: any, options: ParseFromUrlOptions): void;
|
|
2
5
|
export declare function parseFromUrl(sdk: any, options: string | ParseFromUrlOptions): Promise<TokenResponse>;
|
|
@@ -1,14 +1,2 @@
|
|
|
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
1
|
import { TokenParams, Tokens } from '../types';
|
|
14
2
|
export declare function renewTokens(sdk: any, options: TokenParams): Promise<Tokens>;
|
|
@@ -27,4 +27,4 @@ export declare function isLoginRedirect(sdk: OktaAuth): boolean;
|
|
|
27
27
|
* Check if error=interaction_required has been passed back in the url, which happens in
|
|
28
28
|
* the social auth IDP redirect flow.
|
|
29
29
|
*/
|
|
30
|
-
export declare function isInteractionRequired(sdk: OktaAuth): boolean;
|
|
30
|
+
export declare function isInteractionRequired(sdk: OktaAuth, hashOrSearch?: string): boolean;
|
package/lib/types/AuthState.d.ts
CHANGED
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
import { StorageManagerOptions, StorageUtil } from './Storage';
|
|
13
13
|
import { CookieOptions } from './Cookies';
|
|
14
14
|
import { HttpRequestClient } from './http';
|
|
15
|
-
import { OktaAuth } from './';
|
|
16
15
|
import { AuthState } from './AuthState';
|
|
17
16
|
import { TransactionManagerOptions } from './Transaction';
|
|
18
17
|
import { SimpleStorage } from './Storage';
|
|
18
|
+
import { FlowIdentifier } from '../idx/types';
|
|
19
|
+
import OktaAuth from '../OktaAuth';
|
|
19
20
|
export interface TokenManagerOptions {
|
|
20
21
|
autoRenew?: boolean;
|
|
21
22
|
autoRemove?: boolean;
|
|
@@ -64,5 +65,6 @@ export interface OktaAuthOptions extends CustomUrls {
|
|
|
64
65
|
devMode?: boolean;
|
|
65
66
|
storageManager?: StorageManagerOptions;
|
|
66
67
|
transactionManager?: TransactionManagerOptions;
|
|
68
|
+
flow?: FlowIdentifier;
|
|
67
69
|
clientSecret?: string;
|
|
68
70
|
}
|