@okta/okta-auth-js 5.11.0 → 6.0.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 +32 -0
- package/README.md +5 -2
- package/cjs/AuthStateManager.js +2 -1
- package/cjs/AuthStateManager.js.map +1 -1
- package/cjs/OktaAuth.js +75 -71
- package/cjs/OktaAuth.js.map +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/OktaUserAgent.js.map +1 -1
- package/cjs/PromiseQueue.js +6 -1
- package/cjs/PromiseQueue.js.map +1 -1
- package/cjs/StorageManager.js +3 -1
- package/cjs/StorageManager.js.map +1 -1
- package/cjs/TokenManager.js +9 -3
- package/cjs/TokenManager.js.map +1 -1
- package/cjs/TransactionManager.js +17 -4
- package/cjs/TransactionManager.js.map +1 -1
- package/cjs/browser/browserStorage.js +7 -5
- package/cjs/browser/browserStorage.js.map +1 -1
- package/cjs/browser/fingerprint.js +3 -1
- package/cjs/browser/fingerprint.js.map +1 -1
- package/cjs/builderUtil.js +3 -17
- package/cjs/builderUtil.js.map +1 -1
- package/cjs/crypto/oidcHash.js.map +1 -1
- package/cjs/features.js +9 -3
- package/cjs/features.js.map +1 -1
- package/cjs/fetch/fetchRequest.js +2 -1
- package/cjs/fetch/fetchRequest.js.map +1 -1
- package/cjs/http/request.js +2 -0
- package/cjs/http/request.js.map +1 -1
- package/cjs/idx/authenticate.js +8 -5
- package/cjs/idx/authenticate.js.map +1 -1
- package/cjs/idx/authenticator/SecurityQuestionVerification.js +1 -0
- package/cjs/idx/authenticator/SecurityQuestionVerification.js.map +1 -1
- package/cjs/idx/authenticator/VerificationCodeAuthenticator.js +2 -2
- package/cjs/idx/authenticator/VerificationCodeAuthenticator.js.map +1 -1
- package/cjs/idx/authenticator/getAuthenticator.js +5 -6
- package/cjs/idx/authenticator/getAuthenticator.js.map +1 -1
- package/cjs/idx/cancel.js.map +1 -1
- package/cjs/idx/emailVerify.js +73 -0
- package/cjs/idx/emailVerify.js.map +1 -0
- package/cjs/idx/flow/FlowSpecification.js +16 -4
- package/cjs/idx/flow/FlowSpecification.js.map +1 -1
- package/cjs/idx/flow/RegistrationFlow.js +2 -0
- package/cjs/idx/flow/RegistrationFlow.js.map +1 -1
- package/cjs/idx/handleInteractionCodeRedirect.js +1 -0
- package/cjs/idx/handleInteractionCodeRedirect.js.map +1 -1
- package/cjs/idx/index.js +13 -0
- package/cjs/idx/index.js.map +1 -1
- package/cjs/idx/interact.js +46 -34
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js +12 -14
- package/cjs/idx/introspect.js.map +1 -1
- package/cjs/idx/proceed.js +4 -7
- package/cjs/idx/proceed.js.map +1 -1
- package/cjs/idx/recoverPassword.js +1 -1
- package/cjs/idx/recoverPassword.js.map +1 -1
- package/cjs/idx/register.js +6 -15
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/remediate.js +21 -5
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js +2 -0
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorVerificationData.js +5 -3
- package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js +5 -3
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js +2 -0
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js +4 -3
- package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengeAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/EnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/EnrollPoll.js +2 -3
- package/cjs/idx/remediators/EnrollPoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollProfile.js +4 -1
- package/cjs/idx/remediators/EnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/EnrollmentChannelData.js +80 -0
- package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -0
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/remediators/ReEnrollAuthenticator.js +1 -0
- package/cjs/idx/remediators/ReEnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ResetAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js +2 -2
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorEnroll.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollmentChannel.js +74 -0
- package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -0
- package/cjs/idx/remediators/Skip.js.map +1 -1
- package/cjs/idx/remediators/index.js +26 -0
- package/cjs/idx/remediators/index.js.map +1 -1
- package/cjs/idx/remediators/util.js +7 -2
- package/cjs/idx/remediators/util.js.map +1 -1
- package/cjs/idx/run.js +111 -45
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/startTransaction.js +4 -2
- package/cjs/idx/startTransaction.js.map +1 -1
- package/cjs/idx/transactionMeta.js +82 -69
- package/cjs/idx/transactionMeta.js.map +1 -1
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/types/index.js +19 -3
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/index.js +14 -0
- package/cjs/index.js.map +1 -1
- package/cjs/oidc/endpoints/authorize.js +2 -0
- package/cjs/oidc/endpoints/authorize.js.map +1 -1
- package/cjs/oidc/endpoints/token.js +1 -0
- package/cjs/oidc/endpoints/token.js.map +1 -1
- package/cjs/oidc/exchangeCodeForTokens.js +3 -3
- package/cjs/oidc/exchangeCodeForTokens.js.map +1 -1
- package/cjs/oidc/getToken.js +3 -1
- package/cjs/oidc/getToken.js.map +1 -1
- package/cjs/oidc/getWithRedirect.js +10 -37
- package/cjs/oidc/getWithRedirect.js.map +1 -1
- package/cjs/oidc/handleOAuthResponse.js +80 -86
- package/cjs/oidc/handleOAuthResponse.js.map +1 -1
- package/cjs/oidc/parseFromUrl.js.map +1 -1
- package/cjs/oidc/renewToken.js.map +1 -1
- package/cjs/oidc/renewTokens.js +1 -1
- package/cjs/oidc/renewTokens.js.map +1 -1
- package/cjs/oidc/revokeToken.js +28 -29
- package/cjs/oidc/revokeToken.js.map +1 -1
- package/cjs/oidc/util/index.js +14 -0
- package/cjs/oidc/util/index.js.map +1 -1
- package/cjs/oidc/util/loginRedirect.js +6 -1
- package/cjs/oidc/util/loginRedirect.js.map +1 -1
- package/cjs/oidc/util/oauth.js.map +1 -1
- package/cjs/oidc/util/oauthMeta.js +36 -0
- package/cjs/oidc/util/oauthMeta.js.map +1 -0
- package/cjs/oidc/util/pkce.js.map +1 -1
- package/cjs/oidc/util/prepareTokenParams.js +57 -36
- package/cjs/oidc/util/prepareTokenParams.js.map +1 -1
- package/cjs/oidc/util/validateClaims.js +2 -0
- package/cjs/oidc/util/validateClaims.js.map +1 -1
- package/cjs/oidc/verifyToken.js +2 -1
- package/cjs/oidc/verifyToken.js.map +1 -1
- package/cjs/options.js +6 -2
- package/cjs/options.js.map +1 -1
- package/cjs/server/serverStorage.js +1 -1
- package/cjs/server/serverStorage.js.map +1 -1
- package/cjs/services/TokenService.js +3 -0
- package/cjs/services/TokenService.js.map +1 -1
- package/cjs/tx/AuthTransaction.js +3 -0
- package/cjs/tx/AuthTransaction.js.map +1 -1
- package/cjs/tx/TransactionState.js +0 -17
- package/cjs/tx/TransactionState.js.map +1 -1
- package/cjs/tx/api.js +3 -2
- package/cjs/tx/api.js.map +1 -1
- package/cjs/types/Transaction.js.map +1 -1
- package/cjs/util/index.js +0 -13
- package/cjs/util/index.js.map +1 -1
- package/cjs/util/url.js.map +1 -1
- package/dist/okta-auth-js.min.js +1 -1
- package/dist/okta-auth-js.min.js.map +1 -1
- package/dist/okta-auth-js.umd.js +1 -1
- package/dist/okta-auth-js.umd.js.map +1 -1
- package/esm/index.js +1334 -758
- package/esm/index.js.map +1 -1
- package/lib/AuthStateManager.d.ts +1 -2
- package/lib/OktaAuth.d.ts +4 -10
- package/lib/StorageManager.d.ts +1 -1
- package/lib/TokenManager.d.ts +2 -2
- package/lib/TransactionManager.d.ts +3 -2
- package/lib/browser/fingerprint.d.ts +1 -1
- package/lib/builderUtil.d.ts +1 -2
- package/lib/crypto/browser.d.ts +1 -1
- package/lib/features.d.ts +1 -1
- package/lib/idx/authenticate.d.ts +1 -1
- package/lib/idx/authenticator/VerificationCodeAuthenticator.d.ts +1 -1
- package/lib/idx/cancel.d.ts +1 -1
- package/lib/{util → idx}/emailVerify.d.ts +10 -1
- package/lib/idx/flow/FlowSpecification.d.ts +1 -0
- package/lib/idx/index.d.ts +1 -0
- package/lib/idx/interact.d.ts +4 -11
- package/lib/idx/introspect.d.ts +3 -2
- package/lib/idx/proceed.d.ts +4 -2
- package/lib/idx/recoverPassword.d.ts +1 -1
- package/lib/idx/remediate.d.ts +10 -4
- package/lib/idx/remediators/AuthenticatorEnrollmentData.d.ts +3 -3
- package/lib/idx/remediators/AuthenticatorVerificationData.d.ts +3 -3
- package/lib/idx/remediators/Base/AuthenticatorData.d.ts +7 -7
- package/lib/idx/remediators/Base/Remediator.d.ts +1 -1
- package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +7 -7
- package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +2 -1
- package/lib/idx/remediators/EnrollProfile.d.ts +1 -1
- package/lib/idx/remediators/EnrollmentChannelData.d.ts +53 -0
- package/lib/idx/remediators/Identify.d.ts +2 -2
- package/lib/idx/remediators/ReEnrollAuthenticator.d.ts +2 -2
- package/lib/idx/remediators/RedirectIdp.d.ts +3 -3
- package/lib/idx/remediators/SelectEnrollmentChannel.d.ts +39 -0
- package/lib/idx/remediators/index.d.ts +2 -0
- package/lib/idx/remediators/util.d.ts +2 -2
- package/lib/idx/run.d.ts +3 -1
- package/lib/idx/startTransaction.d.ts +3 -2
- package/lib/idx/transactionMeta.d.ts +6 -27
- package/lib/idx/types/idx-js.d.ts +8 -1
- package/lib/idx/types/index.d.ts +17 -6
- package/lib/index.d.ts +1 -0
- package/lib/oidc/exchangeCodeForTokens.d.ts +12 -0
- package/lib/oidc/getWithRedirect.d.ts +1 -1
- package/lib/oidc/handleOAuthResponse.d.ts +1 -1
- package/lib/oidc/parseFromUrl.d.ts +1 -1
- package/lib/oidc/renewToken.d.ts +1 -1
- package/lib/oidc/renewTokens.d.ts +1 -1
- package/lib/oidc/util/browser.d.ts +1 -1
- package/lib/oidc/util/errors.d.ts +1 -1
- package/lib/oidc/util/index.d.ts +1 -0
- package/lib/oidc/util/oauth.d.ts +1 -8
- package/lib/oidc/util/oauthMeta.d.ts +2 -0
- package/lib/oidc/util/prepareTokenParams.d.ts +3 -0
- package/lib/server/serverStorage.d.ts +1 -1
- package/lib/services/TokenService.d.ts +2 -2
- package/lib/tx/AuthTransaction.d.ts +2 -2
- package/lib/tx/TransactionState.d.ts +11 -1
- package/lib/tx/api.d.ts +6 -6
- package/lib/types/OktaAuthOptions.d.ts +5 -6
- package/lib/types/Storage.d.ts +3 -3
- package/lib/types/Transaction.d.ts +11 -0
- package/lib/types/UserClaims.d.ts +3 -3
- package/lib/types/api.d.ts +28 -16
- package/lib/util/console.d.ts +1 -1
- package/lib/util/index.d.ts +0 -1
- package/lib/util/types.d.ts +1 -1
- package/lib/util/url.d.ts +2 -2
- package/package.json +5 -5
- package/cjs/util/emailVerify.js +0 -28
- package/cjs/util/emailVerify.js.map +0 -1
|
@@ -10,33 +10,12 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { OktaAuth, IdxTransactionMeta, TransactionMetaOptions } from '../types';
|
|
13
|
-
export declare function createTransactionMeta(authClient: OktaAuth, options?: TransactionMetaOptions): Promise<
|
|
14
|
-
|
|
15
|
-
|
|
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;
|
|
13
|
+
export declare function createTransactionMeta(authClient: OktaAuth, options?: TransactionMetaOptions): Promise<IdxTransactionMeta>;
|
|
14
|
+
export declare function hasSavedInteractionHandle(authClient: OktaAuth, options?: TransactionMetaOptions): boolean;
|
|
15
|
+
export declare function getSavedTransactionMeta(authClient: OktaAuth, options?: TransactionMetaOptions): IdxTransactionMeta | undefined;
|
|
39
16
|
export declare function getTransactionMeta(authClient: OktaAuth, options?: TransactionMetaOptions): Promise<IdxTransactionMeta>;
|
|
40
17
|
export declare function saveTransactionMeta(authClient: OktaAuth, meta: any): void;
|
|
41
18
|
export declare function clearTransactionMeta(authClient: OktaAuth): void;
|
|
42
|
-
export declare function isTransactionMetaValid(
|
|
19
|
+
export declare function isTransactionMetaValid(meta: any, options?: TransactionMetaOptions): boolean;
|
|
20
|
+
export declare function isTransactionMetaValidForFlow(meta: any, flow: any): boolean;
|
|
21
|
+
export declare function isTransactionMetaValidForOptions(meta: any, options: any, keys: any): boolean;
|
|
@@ -38,6 +38,7 @@ export interface IdxAuthenticator {
|
|
|
38
38
|
question: string;
|
|
39
39
|
}[];
|
|
40
40
|
questionKeys?: string[];
|
|
41
|
+
selectedChannel?: string;
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
44
|
export interface IdxForm {
|
|
@@ -54,6 +55,9 @@ export interface IdpConfig {
|
|
|
54
55
|
id: string;
|
|
55
56
|
name: string;
|
|
56
57
|
}
|
|
58
|
+
export interface IdxRemediationValueForm {
|
|
59
|
+
form: IdxForm;
|
|
60
|
+
}
|
|
57
61
|
export interface IdxRemediationValue {
|
|
58
62
|
name: string;
|
|
59
63
|
type?: string;
|
|
@@ -61,7 +65,7 @@ export interface IdxRemediationValue {
|
|
|
61
65
|
secret?: boolean;
|
|
62
66
|
visible?: boolean;
|
|
63
67
|
mutable?: boolean;
|
|
64
|
-
value?: string;
|
|
68
|
+
value?: string | IdxRemediationValueForm;
|
|
65
69
|
label?: string;
|
|
66
70
|
form?: IdxForm;
|
|
67
71
|
options?: IdxOption[];
|
|
@@ -113,6 +117,9 @@ export interface IdxContext {
|
|
|
113
117
|
type: string;
|
|
114
118
|
value: Record<string, unknown>;
|
|
115
119
|
};
|
|
120
|
+
messages?: IdxMessages;
|
|
121
|
+
success?: IdxRemediation;
|
|
122
|
+
failure?: IdxRemediation;
|
|
116
123
|
}
|
|
117
124
|
export interface IdxMessage {
|
|
118
125
|
message: string;
|
package/lib/idx/types/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { InteractOptions } from '../interact';
|
|
|
13
13
|
import { IntrospectOptions } from '../introspect';
|
|
14
14
|
import { APIError, Tokens } from '../../types';
|
|
15
15
|
import { IdxTransactionMeta } from '../../types/Transaction';
|
|
16
|
-
import { IdxAuthenticator, IdxMessage, IdxOption, IdxResponse } from './idx-js';
|
|
16
|
+
import { IdxActions, IdxAuthenticator, IdxContext, IdxForm, IdxMessage, IdxOption, IdxRemediation, IdxResponse, RawIdxResponse } from './idx-js';
|
|
17
17
|
import { FlowIdentifier } from './FlowIdentifier';
|
|
18
18
|
export { IdxMessage } from './idx-js';
|
|
19
19
|
export { AuthenticationOptions } from '../authenticate';
|
|
@@ -22,6 +22,8 @@ export { PasswordRecoveryOptions } from '../recoverPassword';
|
|
|
22
22
|
export { ProceedOptions } from '../proceed';
|
|
23
23
|
export { CancelOptions } from '../cancel';
|
|
24
24
|
export { FlowIdentifier };
|
|
25
|
+
export { IdxTransactionMeta };
|
|
26
|
+
export { EmailVerifyCallbackResponse } from '../emailVerify';
|
|
25
27
|
export declare enum IdxStatus {
|
|
26
28
|
SUCCESS = "SUCCESS",
|
|
27
29
|
PENDING = "PENDING",
|
|
@@ -41,7 +43,9 @@ export declare type Input = {
|
|
|
41
43
|
name: string;
|
|
42
44
|
type?: string;
|
|
43
45
|
label?: string;
|
|
44
|
-
value?: string
|
|
46
|
+
value?: string | {
|
|
47
|
+
form: IdxForm;
|
|
48
|
+
};
|
|
45
49
|
secret?: boolean;
|
|
46
50
|
required?: boolean;
|
|
47
51
|
};
|
|
@@ -55,9 +59,9 @@ export declare type NextStep = {
|
|
|
55
59
|
poll?: IdxPollOptions;
|
|
56
60
|
};
|
|
57
61
|
export declare enum IdxFeature {
|
|
58
|
-
PASSWORD_RECOVERY =
|
|
59
|
-
REGISTRATION =
|
|
60
|
-
SOCIAL_IDP =
|
|
62
|
+
PASSWORD_RECOVERY = "recover-password",
|
|
63
|
+
REGISTRATION = "enroll-profile",
|
|
64
|
+
SOCIAL_IDP = "redirect-idp"
|
|
61
65
|
}
|
|
62
66
|
export interface IdxTransaction {
|
|
63
67
|
status: IdxStatus;
|
|
@@ -68,10 +72,17 @@ export interface IdxTransaction {
|
|
|
68
72
|
meta?: IdxTransactionMeta;
|
|
69
73
|
enabledFeatures?: IdxFeature[];
|
|
70
74
|
availableSteps?: NextStep[];
|
|
71
|
-
|
|
75
|
+
proceed: (remediationName: string, params: unknown) => Promise<IdxResponse>;
|
|
76
|
+
neededToProceed: IdxRemediation[];
|
|
77
|
+
rawIdxState: RawIdxResponse;
|
|
78
|
+
interactionCode?: string;
|
|
79
|
+
actions: IdxActions;
|
|
80
|
+
context: IdxContext;
|
|
72
81
|
}
|
|
73
82
|
export declare type IdxOptions = InteractOptions & IntrospectOptions & {
|
|
74
83
|
flow?: FlowIdentifier;
|
|
84
|
+
exchangeCodeForTokens?: boolean;
|
|
85
|
+
autoRemediate?: boolean;
|
|
75
86
|
};
|
|
76
87
|
export interface IdxPollOptions {
|
|
77
88
|
required?: boolean;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,14 @@
|
|
|
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
|
+
*/
|
|
1
13
|
import { CustomUrls, OktaAuth, TokenParams, TokenResponse } from '../types';
|
|
2
14
|
export declare function exchangeCodeForTokens(sdk: OktaAuth, tokenParams: TokenParams, urls?: CustomUrls): Promise<TokenResponse>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OktaAuth, TokenParams } from '../types';
|
|
2
|
-
export declare function getWithRedirect(sdk: OktaAuth, options
|
|
2
|
+
export declare function getWithRedirect(sdk: OktaAuth, options?: TokenParams): Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OktaAuth, OAuthResponse, TokenParams, TokenResponse, CustomUrls } from '../types';
|
|
2
|
-
export declare function handleOAuthResponse(sdk: OktaAuth, tokenParams: TokenParams, res: OAuthResponse, urls
|
|
2
|
+
export declare function handleOAuthResponse(sdk: OktaAuth, tokenParams: TokenParams, res: OAuthResponse, urls?: CustomUrls): Promise<TokenResponse>;
|
|
@@ -2,4 +2,4 @@ import { ParseFromUrlOptions, TokenResponse, OAuthResponse } from '../types';
|
|
|
2
2
|
export declare function getResponseMode(sdk: any): 'query' | 'fragment';
|
|
3
3
|
export declare function parseOAuthResponseFromUrl(sdk: any, options: string | ParseFromUrlOptions): OAuthResponse;
|
|
4
4
|
export declare function cleanOAuthResponseFromUrl(sdk: any, options: ParseFromUrlOptions): void;
|
|
5
|
-
export declare function parseFromUrl(sdk: any, options
|
|
5
|
+
export declare function parseFromUrl(sdk: any, options?: string | ParseFromUrlOptions): Promise<TokenResponse>;
|
package/lib/oidc/renewToken.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OktaAuth, Token } from '../types';
|
|
2
|
-
export declare function renewToken(sdk: OktaAuth, token: Token): Promise<Token>;
|
|
2
|
+
export declare function renewToken(sdk: OktaAuth, token: Token): Promise<Token | undefined>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TokenParams, Tokens } from '../types';
|
|
2
|
-
export declare function renewTokens(sdk: any, options
|
|
2
|
+
export declare function renewTokens(sdk: any, options?: TokenParams): Promise<Tokens>;
|
|
@@ -2,5 +2,5 @@ import { OktaAuth } from '../../types';
|
|
|
2
2
|
export declare function addListener(eventTarget: any, name: any, fn: any): void;
|
|
3
3
|
export declare function removeListener(eventTarget: any, name: any, fn: any): void;
|
|
4
4
|
export declare function loadFrame(src: any): HTMLIFrameElement;
|
|
5
|
-
export declare function loadPopup(src: any, options: any): Window;
|
|
5
|
+
export declare function loadPopup(src: any, options: any): Window | null;
|
|
6
6
|
export declare function addPostMessageListener(sdk: OktaAuth, timeout: any, state: any): Promise<unknown>;
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { OktaAuth } from '../../types';
|
|
13
13
|
export declare function isInteractionRequiredError(error: Error): boolean;
|
|
14
|
-
export declare function isAuthorizationCodeError(sdk: OktaAuth, error: Error): boolean;
|
|
14
|
+
export declare function isAuthorizationCodeError(sdk: OktaAuth, error: Error): boolean | undefined;
|
package/lib/oidc/util/index.d.ts
CHANGED
package/lib/oidc/util/oauth.d.ts
CHANGED
|
@@ -3,11 +3,4 @@ export declare function generateState(): string;
|
|
|
3
3
|
export declare function generateNonce(): string;
|
|
4
4
|
export declare function getOAuthBaseUrl(sdk: OktaAuth, options?: CustomUrls): any;
|
|
5
5
|
export declare function getOAuthDomain(sdk: OktaAuth, options?: CustomUrls): any;
|
|
6
|
-
export declare function getOAuthUrls(sdk: OktaAuth, options?: CustomUrls):
|
|
7
|
-
issuer: any;
|
|
8
|
-
authorizeUrl: any;
|
|
9
|
-
userinfoUrl: any;
|
|
10
|
-
tokenUrl: any;
|
|
11
|
-
revokeUrl: any;
|
|
12
|
-
logoutUrl: any;
|
|
13
|
-
};
|
|
6
|
+
export declare function getOAuthUrls(sdk: OktaAuth, options?: CustomUrls): CustomUrls;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { OktaAuth, TokenParams } from '../../types';
|
|
2
|
+
export declare function assertPKCESupport(sdk: OktaAuth): void;
|
|
3
|
+
export declare function validateCodeChallengeMethod(sdk: OktaAuth, codeChallengeMethod?: string): Promise<string>;
|
|
4
|
+
export declare function preparePKCE(sdk: OktaAuth, tokenParams: TokenParams): Promise<TokenParams>;
|
|
2
5
|
export declare function prepareTokenParams(sdk: OktaAuth, tokenParams?: TokenParams): Promise<TokenParams>;
|
|
@@ -18,7 +18,7 @@ declare class ServerStorage implements StorageUtil {
|
|
|
18
18
|
testStorageType(storageType: StorageType): boolean;
|
|
19
19
|
getStorageByType(storageType: StorageType): SimpleStorage;
|
|
20
20
|
findStorageType(): StorageType;
|
|
21
|
-
getHttpCache():
|
|
21
|
+
getHttpCache(): null;
|
|
22
22
|
getStorage(): SimpleStorage;
|
|
23
23
|
}
|
|
24
24
|
declare const _default: ServerStorage;
|
|
@@ -14,8 +14,8 @@ import { TokenManagerOptions } from '../types';
|
|
|
14
14
|
export declare class TokenService {
|
|
15
15
|
private tokenManager;
|
|
16
16
|
private options;
|
|
17
|
-
private storageListener
|
|
18
|
-
private onTokenExpiredHandler
|
|
17
|
+
private storageListener?;
|
|
18
|
+
private onTokenExpiredHandler?;
|
|
19
19
|
private syncTimeout;
|
|
20
20
|
constructor(tokenManager: TokenManager, options?: TokenManagerOptions);
|
|
21
21
|
start(): void;
|
|
@@ -42,7 +42,7 @@ export declare class AuthTransaction implements TransactionState, AuthTransactio
|
|
|
42
42
|
activate?: AuthTransactionFunction;
|
|
43
43
|
poll?: AuthTransactionFunction;
|
|
44
44
|
prev?: AuthTransactionFunction;
|
|
45
|
-
data
|
|
45
|
+
data?: TransactionState;
|
|
46
46
|
stateToken?: string;
|
|
47
47
|
sessionToken?: string;
|
|
48
48
|
status: string | IdxStatus;
|
|
@@ -53,6 +53,6 @@ export declare class AuthTransaction implements TransactionState, AuthTransactio
|
|
|
53
53
|
scopes?: Array<Record<string, any>>;
|
|
54
54
|
target?: Record<string, any>;
|
|
55
55
|
authentication?: Record<string, any>;
|
|
56
|
-
constructor(sdk: any, res?:
|
|
56
|
+
constructor(sdk: any, res?: TransactionState | null);
|
|
57
57
|
}
|
|
58
58
|
export {};
|
|
@@ -9,8 +9,17 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export interface TransactionLink {
|
|
13
|
+
name?: string;
|
|
14
|
+
type: string;
|
|
15
|
+
href: string;
|
|
16
|
+
hints?: {
|
|
17
|
+
allow?: string[];
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface TransactionState {
|
|
13
21
|
interactionHandle?: string;
|
|
22
|
+
status: string;
|
|
14
23
|
stateToken?: string;
|
|
15
24
|
type?: string;
|
|
16
25
|
expiresAt?: string;
|
|
@@ -24,4 +33,5 @@ export declare class TransactionState {
|
|
|
24
33
|
profile?: {
|
|
25
34
|
updatePhone?: boolean;
|
|
26
35
|
};
|
|
36
|
+
_links?: Record<string, TransactionLink>;
|
|
27
37
|
}
|
package/lib/tx/api.d.ts
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
import { AuthTransaction } from './AuthTransaction';
|
|
14
|
-
declare function transactionStatus(sdk: any, args: any): Promise<any>;
|
|
15
|
-
declare function resumeTransaction(sdk: any, args: any): any;
|
|
16
|
-
declare function
|
|
17
|
-
declare function
|
|
18
|
-
declare function
|
|
19
|
-
export
|
|
14
|
+
export declare function transactionStatus(sdk: any, args: any): Promise<any>;
|
|
15
|
+
export declare function resumeTransaction(sdk: any, args: any): any;
|
|
16
|
+
export declare function introspectAuthn(sdk: any, args: any): Promise<AuthTransaction>;
|
|
17
|
+
export declare function transactionStep(sdk: any, args: any): Promise<any>;
|
|
18
|
+
export declare function transactionExists(sdk: any): boolean;
|
|
19
|
+
export declare function postToTransaction(sdk: any, url: any, args: any, options?: any): Promise<AuthTransaction>;
|
|
@@ -28,10 +28,6 @@ export interface TokenManagerOptions {
|
|
|
28
28
|
syncStorage?: boolean;
|
|
29
29
|
_storageEventDelay?: number;
|
|
30
30
|
}
|
|
31
|
-
export interface CustomUserAgent {
|
|
32
|
-
template?: string;
|
|
33
|
-
value?: string;
|
|
34
|
-
}
|
|
35
31
|
export interface CustomUrls {
|
|
36
32
|
issuer?: string;
|
|
37
33
|
authorizeUrl?: string;
|
|
@@ -56,16 +52,19 @@ export interface OktaAuthOptions extends CustomUrls {
|
|
|
56
52
|
storageUtil?: StorageUtil;
|
|
57
53
|
ajaxRequest?: object;
|
|
58
54
|
httpRequestClient?: HttpRequestClient;
|
|
59
|
-
userAgent?: CustomUserAgent;
|
|
60
55
|
cookies?: CookieOptions;
|
|
61
56
|
transformErrorXHR?: (xhr: object) => any;
|
|
62
57
|
headers?: object;
|
|
63
58
|
maxClockSkew?: number;
|
|
64
59
|
transformAuthState?: (oktaAuth: OktaAuth, authState: AuthState) => Promise<AuthState>;
|
|
65
|
-
restoreOriginalUri?: (oktaAuth: OktaAuth, originalUri
|
|
60
|
+
restoreOriginalUri?: (oktaAuth: OktaAuth, originalUri?: string) => Promise<void>;
|
|
66
61
|
devMode?: boolean;
|
|
67
62
|
storageManager?: StorageManagerOptions;
|
|
68
63
|
transactionManager?: TransactionManagerOptions;
|
|
69
64
|
flow?: FlowIdentifier;
|
|
65
|
+
codeChallenge?: string;
|
|
66
|
+
codeChallengeMethod?: string;
|
|
67
|
+
recoveryToken?: string;
|
|
68
|
+
activationToken?: string;
|
|
70
69
|
clientSecret?: string;
|
|
71
70
|
}
|
package/lib/types/Storage.d.ts
CHANGED
|
@@ -49,13 +49,13 @@ export interface StorageOptions extends CookieOptions {
|
|
|
49
49
|
storageTypes?: StorageType[];
|
|
50
50
|
storageProvider?: SimpleStorage;
|
|
51
51
|
storageKey?: string;
|
|
52
|
-
|
|
52
|
+
useSeparateCookies?: boolean;
|
|
53
53
|
}
|
|
54
54
|
export declare type StorageType = 'memory' | 'sessionStorage' | 'localStorage' | 'cookie' | 'custom' | 'auto';
|
|
55
55
|
export interface StorageUtil {
|
|
56
56
|
storage: TxStorage;
|
|
57
57
|
testStorageType(storageType: StorageType): boolean;
|
|
58
|
-
getStorageByType(storageType: StorageType, options
|
|
58
|
+
getStorageByType(storageType: StorageType, options?: StorageOptions): SimpleStorage;
|
|
59
59
|
findStorageType(types: StorageType[]): StorageType;
|
|
60
60
|
}
|
|
61
61
|
export interface BrowserStorageUtil extends StorageUtil {
|
|
@@ -79,7 +79,7 @@ export interface NodeStorageUtil extends StorageUtil {
|
|
|
79
79
|
getStorage(): SimpleStorage;
|
|
80
80
|
}
|
|
81
81
|
export interface CookieStorage extends SimpleStorage {
|
|
82
|
-
setItem(key: string, value: any, expiresAt?: string): void;
|
|
82
|
+
setItem(key: string, value: any, expiresAt?: string | null): void;
|
|
83
83
|
getItem(key?: string): any;
|
|
84
84
|
removeItem(key: string): any;
|
|
85
85
|
}
|
|
@@ -19,12 +19,19 @@ export interface TransactionManagerOptions {
|
|
|
19
19
|
saveNonceCookie?: boolean;
|
|
20
20
|
saveStateCookie?: boolean;
|
|
21
21
|
saveParamsCookie?: boolean;
|
|
22
|
+
saveLastResponse?: boolean;
|
|
22
23
|
}
|
|
23
24
|
export interface TransactionMetaOptions {
|
|
24
25
|
pkce?: boolean;
|
|
25
26
|
oauth?: boolean;
|
|
26
27
|
muteWarning?: boolean;
|
|
27
28
|
state?: string;
|
|
29
|
+
flow?: FlowIdentifier;
|
|
30
|
+
codeVerifier?: string;
|
|
31
|
+
codeChallenge?: string;
|
|
32
|
+
codeChallengeMethod?: string;
|
|
33
|
+
activationToken?: string;
|
|
34
|
+
recoveryToken?: string;
|
|
28
35
|
}
|
|
29
36
|
export interface OAuthTransactionMeta {
|
|
30
37
|
issuer: string;
|
|
@@ -32,6 +39,7 @@ export interface OAuthTransactionMeta {
|
|
|
32
39
|
state: string;
|
|
33
40
|
nonce: string;
|
|
34
41
|
responseType: string | string[];
|
|
42
|
+
responseMode?: string;
|
|
35
43
|
scopes: string[];
|
|
36
44
|
clientId: string;
|
|
37
45
|
urls: CustomUrls;
|
|
@@ -47,6 +55,9 @@ export interface IdxTransactionMeta extends PKCETransactionMeta {
|
|
|
47
55
|
interactionHandle?: string;
|
|
48
56
|
remediations?: string[];
|
|
49
57
|
flow?: FlowIdentifier;
|
|
58
|
+
withCredentials?: boolean;
|
|
59
|
+
activationToken?: string;
|
|
60
|
+
recoveryToken?: string;
|
|
50
61
|
}
|
|
51
62
|
export declare type CustomAuthTransactionMeta = Record<string, string | undefined>;
|
|
52
63
|
export declare type TransactionMeta = IdxTransactionMeta | PKCETransactionMeta | OAuthTransactionMeta | CustomAuthTransactionMeta;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* ID Token or returned from the /userinfo response and depend on the
|
|
16
16
|
* response_type and scope parameters in the authorize request
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export declare type UserClaims<T = {}> = T & {
|
|
19
19
|
auth_time?: number;
|
|
20
20
|
aud?: string;
|
|
21
21
|
email?: string;
|
|
@@ -34,5 +34,5 @@ export interface UserClaims {
|
|
|
34
34
|
updated_at?: number;
|
|
35
35
|
ver?: number;
|
|
36
36
|
zoneinfo?: string;
|
|
37
|
-
|
|
38
|
-
}
|
|
37
|
+
at_hash?: string;
|
|
38
|
+
};
|
package/lib/types/api.d.ts
CHANGED
|
@@ -19,22 +19,22 @@ import TransactionManager from '../TransactionManager';
|
|
|
19
19
|
import { TokenManagerInterface } from './TokenManager';
|
|
20
20
|
import { OktaUserAgent } from '../OktaUserAgent';
|
|
21
21
|
import { FlowIdentifier, IdxPollOptions } from '../idx/types';
|
|
22
|
-
import { AuthenticationOptions, RegistrationOptions as IdxRegistrationOptions, PasswordRecoveryOptions, ProceedOptions, CancelOptions, IdxOptions, IdxTransaction } from '../idx/types';
|
|
22
|
+
import { AuthenticationOptions, RegistrationOptions as IdxRegistrationOptions, PasswordRecoveryOptions, ProceedOptions, CancelOptions, IdxOptions, IdxTransaction, IdxTransactionMeta, EmailVerifyCallbackResponse } from '../idx/types';
|
|
23
23
|
import { InteractOptions, InteractResponse } from '../idx/interact';
|
|
24
24
|
import { IntrospectOptions } from '../idx/introspect';
|
|
25
25
|
import { IdxResponse } from '../idx/types/idx-js';
|
|
26
|
+
import { TransactionMetaOptions } from './Transaction';
|
|
26
27
|
export interface OktaAuth {
|
|
27
28
|
options: OktaAuthOptions;
|
|
28
|
-
userAgent: string;
|
|
29
29
|
getIssuerOrigin(): string;
|
|
30
|
-
getOriginalUri(): string;
|
|
30
|
+
getOriginalUri(): string | undefined;
|
|
31
31
|
_oktaUserAgent: OktaUserAgent;
|
|
32
32
|
storageManager: StorageManager;
|
|
33
33
|
transactionManager: TransactionManager;
|
|
34
34
|
tokenManager: TokenManagerInterface;
|
|
35
35
|
idx: IdxAPI;
|
|
36
|
-
features
|
|
37
|
-
token
|
|
36
|
+
features: FeaturesAPI;
|
|
37
|
+
token: TokenAPI;
|
|
38
38
|
}
|
|
39
39
|
export interface APIError {
|
|
40
40
|
errorSummary: string;
|
|
@@ -83,11 +83,10 @@ export interface TokenParams extends CustomUrls {
|
|
|
83
83
|
scopes?: string[];
|
|
84
84
|
display?: string;
|
|
85
85
|
ignoreSignature?: boolean;
|
|
86
|
-
codeChallengeMethod?: string;
|
|
87
86
|
codeVerifier?: string;
|
|
88
87
|
authorizationCode?: string;
|
|
89
88
|
codeChallenge?: string;
|
|
90
|
-
|
|
89
|
+
codeChallengeMethod?: string;
|
|
91
90
|
interactionCode?: string;
|
|
92
91
|
idp?: string;
|
|
93
92
|
idpScope?: string | string[];
|
|
@@ -136,8 +135,8 @@ export interface TokenAPI extends BaseTokenAPI {
|
|
|
136
135
|
getWithoutPrompt(params?: TokenParams): Promise<TokenResponse>;
|
|
137
136
|
getWithPopup(params?: TokenParams): Promise<TokenResponse>;
|
|
138
137
|
revoke(token: RevocableToken): Promise<object>;
|
|
139
|
-
renew(token: Token): Promise<Token>;
|
|
140
|
-
renewTokens(): Promise<Tokens>;
|
|
138
|
+
renew(token: Token): Promise<Token | undefined>;
|
|
139
|
+
renewTokens(options?: TokenParams): Promise<Tokens>;
|
|
141
140
|
renewTokensWithRefresh(tokenParams: TokenParams, refreshTokenObject: RefreshToken): Promise<Tokens>;
|
|
142
141
|
verify(token: IDToken, params?: object): Promise<IDToken>;
|
|
143
142
|
isLoginRedirect(): boolean;
|
|
@@ -192,7 +191,7 @@ export interface SignoutOptions extends SignoutRedirectUrlOptions {
|
|
|
192
191
|
revokeRefreshToken?: boolean;
|
|
193
192
|
accessToken?: AccessToken;
|
|
194
193
|
refreshToken?: RefreshToken;
|
|
195
|
-
|
|
194
|
+
clearTokensBeforeRedirect?: boolean;
|
|
196
195
|
}
|
|
197
196
|
export interface SignoutAPI {
|
|
198
197
|
signOut(opts: SignoutOptions): any;
|
|
@@ -215,15 +214,28 @@ export interface IdxAPI {
|
|
|
215
214
|
introspect: (options?: IntrospectOptions) => Promise<IdxResponse>;
|
|
216
215
|
authenticate: (options?: AuthenticationOptions) => Promise<IdxTransaction>;
|
|
217
216
|
register: (options?: IdxRegistrationOptions) => Promise<IdxTransaction>;
|
|
217
|
+
recoverPassword: (options?: PasswordRecoveryOptions) => Promise<IdxTransaction>;
|
|
218
218
|
poll: (options?: IdxPollOptions) => Promise<IdxTransaction>;
|
|
219
|
+
start: (options?: IdxOptions) => Promise<IdxTransaction>;
|
|
220
|
+
canProceed(options?: {
|
|
221
|
+
state?: string;
|
|
222
|
+
}): boolean;
|
|
219
223
|
proceed: (options?: ProceedOptions) => Promise<IdxTransaction>;
|
|
220
224
|
cancel: (options?: CancelOptions) => Promise<IdxTransaction>;
|
|
225
|
+
getFlow(): FlowIdentifier | undefined;
|
|
226
|
+
setFlow(flow: FlowIdentifier): void;
|
|
221
227
|
startTransaction: (options?: IdxOptions) => Promise<IdxTransaction>;
|
|
222
|
-
|
|
228
|
+
isInteractionRequired: (hashOrSearch?: string) => boolean;
|
|
229
|
+
isInteractionRequiredError: (error: Error) => boolean;
|
|
223
230
|
handleInteractionCodeRedirect: (url: string) => Promise<void>;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
231
|
+
isEmailVerifyCallback: (search: string) => boolean;
|
|
232
|
+
parseEmailVerifyCallback: (search: string) => EmailVerifyCallbackResponse;
|
|
233
|
+
handleEmailVerifyCallback: (search: string) => Promise<IdxTransaction | undefined>;
|
|
234
|
+
isEmailVerifyCallbackError: (error: Error) => boolean;
|
|
235
|
+
getSavedTransactionMeta: (options?: TransactionMetaOptions) => IdxTransactionMeta | undefined;
|
|
236
|
+
createTransactionMeta: (options?: TransactionMetaOptions) => Promise<IdxTransactionMeta>;
|
|
237
|
+
getTransactionMeta: (options?: TransactionMetaOptions) => Promise<IdxTransactionMeta>;
|
|
238
|
+
saveTransactionMeta: (meta: unknown) => void;
|
|
239
|
+
clearTransactionMeta: () => void;
|
|
240
|
+
isTransactionMetaValid: (meta: unknown) => boolean;
|
|
229
241
|
}
|
package/lib/util/console.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
export declare function getNativeConsole(): Console;
|
|
12
|
+
export declare function getNativeConsole(): Console | undefined;
|
|
13
13
|
export declare function getConsole(): Console | {
|
|
14
14
|
log: () => void;
|
|
15
15
|
warn: () => void;
|
package/lib/util/index.d.ts
CHANGED
package/lib/util/types.d.ts
CHANGED
|
@@ -13,4 +13,4 @@ export declare function isString(obj: any): obj is string;
|
|
|
13
13
|
export declare function isObject(obj: any): obj is object;
|
|
14
14
|
export declare function isNumber(obj: any): obj is number;
|
|
15
15
|
export declare function isFunction(fn: any): fn is Function;
|
|
16
|
-
export declare function isPromise(obj: any):
|
|
16
|
+
export declare function isPromise(obj: any): any;
|
package/lib/util/url.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
export declare function isAbsoluteUrl(url: any): boolean;
|
|
13
|
-
export declare function toAbsoluteUrl(url: string, baseUrl: any): string;
|
|
14
|
-
export declare function toRelativeUrl(url: string, baseUrl: any): string;
|
|
13
|
+
export declare function toAbsoluteUrl(url: string | undefined, baseUrl: any): string;
|
|
14
|
+
export declare function toRelativeUrl(url: string | undefined, baseUrl: any): string;
|
|
15
15
|
export declare function toQueryString(obj: any): string;
|
|
16
16
|
export declare function removeTrailingSlash(path: any): any;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@okta/okta-auth-js",
|
|
4
4
|
"description": "The Okta Auth SDK",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "6.0.0",
|
|
6
6
|
"homepage": "https://github.com/okta/okta-auth-js",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"main": "cjs/index.js",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@babel/runtime": "^7.12.5",
|
|
73
|
-
"@okta/okta-idx-js": "0.
|
|
73
|
+
"@okta/okta-idx-js": "0.24.0",
|
|
74
74
|
"@peculiar/webcrypto": "1.1.6",
|
|
75
75
|
"Base64": "1.1.0",
|
|
76
76
|
"atob": "^2.1.2",
|
|
@@ -169,8 +169,8 @@
|
|
|
169
169
|
}
|
|
170
170
|
},
|
|
171
171
|
"okta": {
|
|
172
|
-
"commitSha": "
|
|
173
|
-
"fullVersion": "
|
|
174
|
-
"testedSha": "
|
|
172
|
+
"commitSha": "e9538b625a2a6be20f0f3dcdabb0f6858499b1df",
|
|
173
|
+
"fullVersion": "6.0.0-ge9538b6",
|
|
174
|
+
"testedSha": "f1b290b3b133a0bae4fe77b4d51e747949326777"
|
|
175
175
|
}
|
|
176
176
|
}
|
package/cjs/util/emailVerify.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.isEmailVerifyCallback = isEmailVerifyCallback;
|
|
4
|
-
exports.parseEmailVerifyCallback = parseEmailVerifyCallback;
|
|
5
|
-
|
|
6
|
-
var _urlParams = require("../oidc/util/urlParams");
|
|
7
|
-
|
|
8
|
-
/*!
|
|
9
|
-
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
10
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
11
|
-
*
|
|
12
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
15
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
-
*
|
|
17
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
18
|
-
*/
|
|
19
|
-
// Check if state && stateTokenExternalId have been passed back in the url
|
|
20
|
-
function isEmailVerifyCallback(urlPath) {
|
|
21
|
-
return /(stateTokenExternalId=)/i.test(urlPath) && /(state=)/i.test(urlPath);
|
|
22
|
-
} // Parse state and stateTokenExternalId from a urlPath (should be either a search or fragment from the URL)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
function parseEmailVerifyCallback(urlPath) {
|
|
26
|
-
return (0, _urlParams.urlParamsToObject)(urlPath);
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=emailVerify.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/util/emailVerify.ts"],"names":["isEmailVerifyCallback","urlPath","test","parseEmailVerifyCallback"],"mappings":";;;;;AAaA;;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACO,SAASA,qBAAT,CAAgCC,OAAhC,EAA0D;AAC/D,SAAO,2BAA2BC,IAA3B,CAAgCD,OAAhC,KAA4C,YAAYC,IAAZ,CAAiBD,OAAjB,CAAnD;AACD,C,CAED;;;AACO,SAASE,wBAAT,CAAkCF,OAAlC,EAAgF;AACrF,SAAO,kCAAkBA,OAAlB,CAAP;AACD","sourcesContent":["\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { urlParamsToObject } from '../oidc/util/urlParams';\n\nexport interface EmailVerifyCallbackResponse {\n state: string;\n stateTokenExternalId: string;\n}\n\n// Check if state && stateTokenExternalId have been passed back in the url\nexport function isEmailVerifyCallback (urlPath: string): boolean {\n return /(stateTokenExternalId=)/i.test(urlPath) && /(state=)/i.test(urlPath);\n}\n\n// Parse state and stateTokenExternalId from a urlPath (should be either a search or fragment from the URL)\nexport function parseEmailVerifyCallback(urlPath: string): EmailVerifyCallbackResponse {\n return urlParamsToObject(urlPath) as EmailVerifyCallbackResponse;\n}\n"],"file":"emailVerify.js"}
|