@okta/okta-auth-js 5.6.0 → 5.9.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 +51 -0
- package/README.md +28 -1
- package/cjs/OktaAuth.js +69 -35
- package/cjs/OktaAuth.js.map +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/StorageManager.js +8 -0
- package/cjs/StorageManager.js.map +1 -1
- package/cjs/TransactionManager.js +24 -12
- package/cjs/TransactionManager.js.map +1 -1
- package/cjs/builderUtil.js +6 -0
- package/cjs/builderUtil.js.map +1 -1
- package/cjs/constants.js +3 -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 +33 -37
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js +3 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Identify.js +4 -2
- package/cjs/idx/remediators/Identify.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 +77 -39
- 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 +16 -0
- 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 +2 -6
- package/cjs/oidc/getWithRedirect.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 +12 -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/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/OktaAuth.d.ts +7 -3
- package/lib/StorageManager.d.ts +1 -0
- package/lib/TransactionManager.d.ts +5 -1
- package/lib/constants.d.ts +1 -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 +1 -4
- package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +1 -4
- package/lib/idx/remediators/Identify.d.ts +1 -0
- 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 +4 -0
- package/lib/idx/types/index.d.ts +14 -3
- package/lib/oidc/getToken.d.ts +2 -2
- package/lib/oidc/renewTokens.d.ts +0 -12
- package/lib/oidc/util/loginRedirect.d.ts +1 -1
- package/lib/types/OktaAuthOptions.d.ts +2 -0
- package/lib/types/Transaction.d.ts +2 -0
- package/lib/types/api.d.ts +20 -5
- package/{esm/errors/AuthPollStopError.js → lib/util/emailVerify.d.ts} +5 -8
- package/lib/util/index.d.ts +1 -0
- package/package.json +26 -14
- 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 -214
- package/esm/AuthStateManager.js.map +0 -1
- package/esm/OktaAuth.js +0 -679
- 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 -182
- 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 -316
- 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 -35
- 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 -302
- 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 -221
- 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 -63
- 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 -79
- package/esm/idx/remediators/EnrollProfile.js.map +0 -1
- package/esm/idx/remediators/Identify.js +0 -86
- 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 -114
- 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 -44
- 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 -65
- 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 -144
- 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 -134
- 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/sharedStorage.js +0 -43
- package/esm/util/sharedStorage.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
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,9 +67,9 @@ 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;
|
|
70
|
+
setOriginalUri(originalUri: string, state?: string): void;
|
|
67
71
|
getOriginalUri(state?: string): string;
|
|
68
|
-
removeOriginalUri(): void;
|
|
72
|
+
removeOriginalUri(state?: string): void;
|
|
69
73
|
isLoginRedirect(): boolean;
|
|
70
74
|
handleLoginRedirect(tokens?: Tokens, originalUri?: string): Promise<void>;
|
|
71
75
|
isPKCE(): boolean;
|
package/lib/StorageManager.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export default class StorageManager {
|
|
|
19
19
|
getStorage(options: StorageOptions): SimpleStorage;
|
|
20
20
|
getTransactionStorage(options?: StorageOptions): TransactionStorage;
|
|
21
21
|
getSharedTansactionStorage(options?: StorageOptions): TransactionStorage;
|
|
22
|
+
getOriginalUriStorage(options?: StorageOptions): TransactionStorage;
|
|
22
23
|
getIdxResponseStorage(options?: StorageOptions): IdxResponseStorage;
|
|
23
24
|
getTokenStorage(options?: StorageOptions): StorageProvider;
|
|
24
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;
|
|
@@ -21,7 +24,7 @@ export default class TransactionManager {
|
|
|
21
24
|
saveParamsCookie: boolean;
|
|
22
25
|
enableSharedStorage: boolean;
|
|
23
26
|
constructor(options: TransactionManagerOptions);
|
|
24
|
-
clear(options?:
|
|
27
|
+
clear(options?: ClearTransactionMetaOptions): void;
|
|
25
28
|
save(meta: TransactionMeta, options?: TransactionMetaOptions): void;
|
|
26
29
|
exists(options?: TransactionMetaOptions): boolean;
|
|
27
30
|
load(options?: TransactionMetaOptions): TransactionMeta;
|
|
@@ -31,4 +34,5 @@ export default class TransactionManager {
|
|
|
31
34
|
loadLegacyOAuthParams(): OAuthTransactionMeta;
|
|
32
35
|
saveIdxResponse(idxResponse: RawIdxResponse): void;
|
|
33
36
|
loadIdxResponse(): RawIdxResponse;
|
|
37
|
+
clearIdxResponse(): void;
|
|
34
38
|
}
|
package/lib/constants.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ 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
23
|
export declare const SHARED_TRANSACTION_STORAGE_NAME = "okta-shared-transaction-storage";
|
|
24
|
+
export declare const ORIGINAL_URI_STORAGE_NAME = "okta-original-uri-storage";
|
|
24
25
|
export declare const IDX_RESPONSE_STORAGE_NAME = "okta-idx-response-storage";
|
|
25
26
|
export declare const ACCESS_TOKEN_STORAGE_KEY = "accessToken";
|
|
26
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>;
|
|
@@ -27,10 +27,7 @@ export declare class AuthenticatorData extends Remediator {
|
|
|
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;
|
|
@@ -31,10 +31,7 @@ export declare class SelectAuthenticator extends Remediator {
|
|
|
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;
|
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';
|
|
@@ -43,6 +43,8 @@ export interface IdxRemediationValue {
|
|
|
43
43
|
type?: string;
|
|
44
44
|
required?: boolean;
|
|
45
45
|
secret?: boolean;
|
|
46
|
+
visible?: boolean;
|
|
47
|
+
mutable?: boolean;
|
|
46
48
|
value?: string;
|
|
47
49
|
label?: string;
|
|
48
50
|
form?: IdxForm;
|
|
@@ -63,6 +65,7 @@ export interface IdxRemediation {
|
|
|
63
65
|
href?: string;
|
|
64
66
|
method?: string;
|
|
65
67
|
type?: string;
|
|
68
|
+
accepts?: string;
|
|
66
69
|
}
|
|
67
70
|
export interface IdxMessage {
|
|
68
71
|
message: string;
|
|
@@ -101,3 +104,4 @@ export interface IdxResponse {
|
|
|
101
104
|
interactionHandle?: string;
|
|
102
105
|
};
|
|
103
106
|
}
|
|
107
|
+
export declare function isIdxResponse(obj: any): obj is IdxResponse;
|
package/lib/idx/types/index.d.ts
CHANGED
|
@@ -10,14 +10,18 @@
|
|
|
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 { IdxAuthenticator, 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
26
|
SUCCESS = "SUCCESS",
|
|
23
27
|
PENDING = "PENDING",
|
|
@@ -32,8 +36,12 @@ export declare enum AuthenticatorKey {
|
|
|
32
36
|
PHONE_NUMBER = "phone_number",
|
|
33
37
|
GOOGLE_AUTHENTICATOR = "google_otp"
|
|
34
38
|
}
|
|
35
|
-
declare type Input = {
|
|
39
|
+
export declare type Input = {
|
|
36
40
|
name: string;
|
|
41
|
+
type?: string;
|
|
42
|
+
label?: string;
|
|
43
|
+
value?: string;
|
|
44
|
+
secret?: boolean;
|
|
37
45
|
required?: boolean;
|
|
38
46
|
};
|
|
39
47
|
export declare type NextStep = {
|
|
@@ -58,8 +66,11 @@ export interface IdxTransaction {
|
|
|
58
66
|
meta?: IdxTransactionMeta;
|
|
59
67
|
enabledFeatures?: IdxFeature[];
|
|
60
68
|
availableSteps?: NextStep[];
|
|
69
|
+
_idxResponse?: IdxResponse;
|
|
61
70
|
}
|
|
62
|
-
export declare type IdxOptions = InteractOptions
|
|
71
|
+
export declare type IdxOptions = InteractOptions & IntrospectOptions & {
|
|
72
|
+
flow?: FlowIdentifier;
|
|
73
|
+
};
|
|
63
74
|
export declare type Authenticator = {
|
|
64
75
|
key: string;
|
|
65
76
|
methodType?: string;
|
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,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;
|
|
@@ -15,6 +15,7 @@ import { HttpRequestClient } from './http';
|
|
|
15
15
|
import { AuthState } from './AuthState';
|
|
16
16
|
import { TransactionManagerOptions } from './Transaction';
|
|
17
17
|
import { SimpleStorage } from './Storage';
|
|
18
|
+
import { FlowIdentifier } from '../idx/types';
|
|
18
19
|
import OktaAuth from '../OktaAuth';
|
|
19
20
|
export interface TokenManagerOptions {
|
|
20
21
|
autoRenew?: 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
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import StorageManager from '../StorageManager';
|
|
13
13
|
import { CustomUrls } from './OktaAuthOptions';
|
|
14
|
+
import { FlowIdentifier } from '../idx/types';
|
|
14
15
|
export interface TransactionManagerOptions {
|
|
15
16
|
storageManager?: StorageManager;
|
|
16
17
|
enableSharedStorage?: boolean;
|
|
@@ -45,6 +46,7 @@ export interface PKCETransactionMeta extends OAuthTransactionMeta {
|
|
|
45
46
|
export interface IdxTransactionMeta extends PKCETransactionMeta {
|
|
46
47
|
interactionHandle?: string;
|
|
47
48
|
remediations?: string[];
|
|
49
|
+
flow?: FlowIdentifier;
|
|
48
50
|
}
|
|
49
51
|
export declare type CustomAuthTransactionMeta = Record<string, string | undefined>;
|
|
50
52
|
export declare type TransactionMeta = IdxTransactionMeta | PKCETransactionMeta | OAuthTransactionMeta | CustomAuthTransactionMeta;
|
package/lib/types/api.d.ts
CHANGED
|
@@ -18,7 +18,8 @@ import StorageManager from '../StorageManager';
|
|
|
18
18
|
import TransactionManager from '../TransactionManager';
|
|
19
19
|
import { TokenManagerInterface } from './TokenManager';
|
|
20
20
|
import { OktaUserAgent } from '../OktaUserAgent';
|
|
21
|
-
import {
|
|
21
|
+
import { FlowIdentifier } from '../idx/types';
|
|
22
|
+
import { AuthenticationOptions, RegistrationOptions as IdxRegistrationOptions, PasswordRecoveryOptions, ProceedOptions, CancelOptions, IdxOptions, IdxTransaction } from '../idx/types';
|
|
22
23
|
import { InteractOptions, InteractResponse } from '../idx/interact';
|
|
23
24
|
import { IntrospectOptions } from '../idx/introspect';
|
|
24
25
|
import { IdxResponse } from '../idx/types/idx-js';
|
|
@@ -31,6 +32,7 @@ export interface OktaAuth {
|
|
|
31
32
|
storageManager: StorageManager;
|
|
32
33
|
transactionManager: TransactionManager;
|
|
33
34
|
tokenManager: TokenManagerInterface;
|
|
35
|
+
idx: IdxAPI;
|
|
34
36
|
features?: FeaturesAPI;
|
|
35
37
|
token?: TokenAPI;
|
|
36
38
|
}
|
|
@@ -94,7 +96,14 @@ export interface TokenParams extends CustomUrls {
|
|
|
94
96
|
prompt?: string;
|
|
95
97
|
sessionToken?: string;
|
|
96
98
|
timeout?: number;
|
|
99
|
+
extraParams?: {
|
|
100
|
+
[propName: string]: string;
|
|
101
|
+
};
|
|
102
|
+
popupTitle?: string;
|
|
103
|
+
}
|
|
104
|
+
export interface PopupParams {
|
|
97
105
|
popupTitle?: string;
|
|
106
|
+
popupWindow?: Window;
|
|
98
107
|
}
|
|
99
108
|
export interface TokenResponse {
|
|
100
109
|
tokens: Tokens;
|
|
@@ -162,7 +171,7 @@ export interface SigninOptions extends SupportsCodeFlow, AuthenticationOptions {
|
|
|
162
171
|
context?: string;
|
|
163
172
|
sendFingerprint?: boolean;
|
|
164
173
|
}
|
|
165
|
-
export interface SigninWithRedirectOptions extends SigninOptions {
|
|
174
|
+
export interface SigninWithRedirectOptions extends SigninOptions, TokenParams {
|
|
166
175
|
originalUri?: string;
|
|
167
176
|
}
|
|
168
177
|
export interface SigninWithCredentialsOptions extends SigninOptions {
|
|
@@ -203,10 +212,16 @@ export interface PkceAPI {
|
|
|
203
212
|
export interface IdxAPI {
|
|
204
213
|
interact: (options?: InteractOptions) => Promise<InteractResponse>;
|
|
205
214
|
introspect: (options?: IntrospectOptions) => Promise<IdxResponse>;
|
|
206
|
-
authenticate: (options
|
|
207
|
-
register: (options
|
|
215
|
+
authenticate: (options?: AuthenticationOptions) => Promise<IdxTransaction>;
|
|
216
|
+
register: (options?: IdxRegistrationOptions) => Promise<IdxTransaction>;
|
|
217
|
+
proceed: (options?: ProceedOptions) => Promise<IdxTransaction>;
|
|
208
218
|
cancel: (options?: CancelOptions) => Promise<IdxTransaction>;
|
|
209
219
|
startTransaction: (options?: IdxOptions) => Promise<IdxTransaction>;
|
|
210
|
-
recoverPassword: (options
|
|
220
|
+
recoverPassword: (options?: PasswordRecoveryOptions) => Promise<IdxTransaction>;
|
|
211
221
|
handleInteractionCodeRedirect: (url: string) => Promise<void>;
|
|
222
|
+
getFlow(): FlowIdentifier;
|
|
223
|
+
setFlow(flow: FlowIdentifier): void;
|
|
224
|
+
canProceed(options?: {
|
|
225
|
+
state?: string;
|
|
226
|
+
}): boolean;
|
|
212
227
|
}
|
|
@@ -9,12 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var message = 'The poll was stopped by the sdk';
|
|
16
|
-
super(message);
|
|
17
|
-
}
|
|
18
|
-
|
|
12
|
+
export interface EmailVerifyCallbackResponse {
|
|
13
|
+
state: string;
|
|
14
|
+
stateTokenExternalId: string;
|
|
19
15
|
}
|
|
20
|
-
|
|
16
|
+
export declare function isEmailVerifyCallback(urlPath: string): boolean;
|
|
17
|
+
export declare function parseEmailVerifyCallback(urlPath: string): EmailVerifyCallbackResponse;
|
package/lib/util/index.d.ts
CHANGED