@okta/okta-auth-js 6.5.3 → 6.6.2
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 +23 -0
- package/cjs/OktaAuth.js +23 -21
- package/cjs/OktaAuth.js.map +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/ServiceManager.js +9 -9
- package/cjs/ServiceManager.js.map +1 -1
- package/cjs/TokenManager.js +6 -0
- package/cjs/TokenManager.js.map +1 -1
- package/cjs/errors/index.js +5 -0
- package/cjs/errors/index.js.map +1 -1
- package/cjs/http/request.js.map +1 -1
- package/cjs/idx/authenticate.js.map +1 -1
- package/cjs/idx/cancel.js.map +1 -1
- package/cjs/idx/emailVerify.js.map +1 -1
- package/cjs/idx/flow/FlowSpecification.js.map +1 -1
- package/cjs/idx/idxState/index.js +1 -1
- package/cjs/idx/idxState/index.js.map +1 -1
- package/cjs/idx/idxState/v1/generateIdxAction.js +2 -4
- package/cjs/idx/idxState/v1/generateIdxAction.js.map +1 -1
- package/cjs/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/cjs/idx/idxState/v1/makeIdxState.js.map +1 -1
- package/cjs/idx/idxState/v1/remediationParser.js.map +1 -1
- package/cjs/idx/interact.js +1 -3
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js.map +1 -1
- package/cjs/idx/poll.js.map +1 -1
- package/cjs/idx/proceed.js.map +1 -1
- package/cjs/idx/recoverPassword.js.map +1 -1
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/remediate.js +8 -12
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/EnrollPoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js +1 -3
- package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/util.js +7 -1
- package/cjs/idx/remediators/GenericRemediator/util.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
- package/cjs/idx/run.js +8 -10
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/startTransaction.js.map +1 -1
- package/cjs/idx/transactionMeta.js.map +1 -1
- package/cjs/idx/types/api.js.map +1 -1
- package/cjs/idx/unlockAccount.js.map +1 -1
- package/cjs/idx/util.js +22 -27
- package/cjs/idx/util.js.map +1 -1
- package/cjs/oidc/endpoints/token.js.map +1 -1
- package/cjs/oidc/endpoints/well-known.js.map +1 -1
- package/cjs/oidc/exchangeCodeForTokens.js.map +1 -1
- package/cjs/oidc/getToken.js.map +1 -1
- package/cjs/oidc/getUserInfo.js.map +1 -1
- package/cjs/oidc/getWithPopup.js.map +1 -1
- package/cjs/oidc/getWithRedirect.js.map +1 -1
- package/cjs/oidc/getWithoutPrompt.js.map +1 -1
- package/cjs/oidc/handleOAuthResponse.js +1 -3
- package/cjs/oidc/handleOAuthResponse.js.map +1 -1
- package/cjs/oidc/renewToken.js.map +1 -1
- package/cjs/oidc/renewTokensWithRefresh.js +26 -15
- package/cjs/oidc/renewTokensWithRefresh.js.map +1 -1
- package/cjs/oidc/revokeToken.js.map +1 -1
- package/cjs/oidc/util/browser.js.map +1 -1
- package/cjs/oidc/util/defaultTokenParams.js.map +1 -1
- package/cjs/oidc/util/errors.js +8 -0
- package/cjs/oidc/util/errors.js.map +1 -1
- package/cjs/oidc/util/loginRedirect.js.map +1 -1
- package/cjs/oidc/util/oauth.js.map +1 -1
- package/cjs/oidc/util/oauthMeta.js.map +1 -1
- package/cjs/oidc/util/prepareTokenParams.js.map +1 -1
- package/cjs/oidc/util/validateClaims.js.map +1 -1
- package/cjs/oidc/verifyToken.js.map +1 -1
- package/cjs/options/index.js +5 -2
- package/cjs/options/index.js.map +1 -1
- package/cjs/tx/AuthTransaction.js +1 -1
- package/cjs/tx/AuthTransaction.js.map +1 -1
- package/cjs/tx/api.js +3 -5
- package/cjs/tx/api.js.map +1 -1
- package/cjs/tx/poll.js +1 -3
- package/cjs/tx/poll.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/esm.browser.js +577 -446
- package/esm/esm.browser.js.map +1 -1
- package/esm/esm.node.mjs +577 -446
- package/esm/esm.node.mjs.map +1 -1
- package/lib/OktaAuth.d.ts +4 -4
- package/lib/ServiceManager.d.ts +2 -2
- package/lib/TokenManager.d.ts +1 -0
- package/lib/errors/index.d.ts +2 -1
- package/lib/http/request.d.ts +4 -4
- package/lib/idx/authenticate.d.ts +2 -2
- package/lib/idx/cancel.d.ts +2 -2
- package/lib/idx/emailVerify.d.ts +2 -2
- package/lib/idx/flow/FlowSpecification.d.ts +2 -2
- package/lib/idx/idxState/index.d.ts +3 -3
- package/lib/idx/idxState/v1/generateIdxAction.d.ts +2 -2
- package/lib/idx/idxState/v1/idxResponseParser.d.ts +3 -3
- package/lib/idx/idxState/v1/makeIdxState.d.ts +3 -3
- package/lib/idx/idxState/v1/remediationParser.d.ts +2 -2
- package/lib/idx/interact.d.ts +2 -2
- package/lib/idx/introspect.d.ts +2 -2
- package/lib/idx/poll.d.ts +2 -2
- package/lib/idx/proceed.d.ts +3 -3
- package/lib/idx/recoverPassword.d.ts +2 -2
- package/lib/idx/register.d.ts +2 -2
- package/lib/idx/remediate.d.ts +2 -2
- package/lib/idx/remediators/Base/AuthenticatorData.d.ts +2 -2
- package/lib/idx/remediators/Base/Remediator.d.ts +2 -2
- package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +2 -2
- package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +2 -2
- package/lib/idx/remediators/EnrollPoll.d.ts +2 -2
- package/lib/idx/remediators/EnrollmentChannelData.d.ts +2 -2
- package/lib/idx/remediators/GenericRemediator/GenericRemediator.d.ts +2 -2
- package/lib/idx/remediators/SelectEnrollmentChannel.d.ts +2 -2
- package/lib/idx/run.d.ts +2 -2
- package/lib/idx/startTransaction.d.ts +2 -2
- package/lib/idx/transactionMeta.d.ts +7 -7
- package/lib/idx/types/api.d.ts +0 -1
- package/lib/idx/unlockAccount.d.ts +2 -2
- package/lib/idx/util.d.ts +6 -6
- package/lib/oidc/endpoints/token.d.ts +2 -2
- package/lib/oidc/endpoints/well-known.d.ts +3 -3
- package/lib/oidc/exchangeCodeForTokens.d.ts +2 -2
- package/lib/oidc/getToken.d.ts +2 -2
- package/lib/oidc/getUserInfo.d.ts +2 -2
- package/lib/oidc/getWithPopup.d.ts +2 -2
- package/lib/oidc/getWithRedirect.d.ts +2 -2
- package/lib/oidc/getWithoutPrompt.d.ts +2 -2
- package/lib/oidc/handleOAuthResponse.d.ts +2 -2
- package/lib/oidc/renewToken.d.ts +2 -2
- package/lib/oidc/renewTokensWithRefresh.d.ts +2 -2
- package/lib/oidc/revokeToken.d.ts +2 -2
- package/lib/oidc/util/browser.d.ts +2 -2
- package/lib/oidc/util/defaultTokenParams.d.ts +2 -2
- package/lib/oidc/util/errors.d.ts +3 -2
- package/lib/oidc/util/loginRedirect.d.ts +4 -4
- package/lib/oidc/util/oauth.d.ts +4 -4
- package/lib/oidc/util/oauthMeta.d.ts +2 -2
- package/lib/oidc/util/prepareTokenParams.d.ts +5 -5
- package/lib/oidc/util/validateClaims.d.ts +2 -2
- package/lib/oidc/verifyToken.d.ts +2 -2
- package/lib/tx/api.d.ts +2 -3
- package/lib/types/OktaAuthOptions.d.ts +2 -2
- package/lib/types/Service.d.ts +2 -2
- package/lib/types/TokenManager.d.ts +1 -0
- package/lib/types/UserClaims.d.ts +4 -1
- package/lib/types/api.d.ts +28 -8
- package/package.json +13 -23
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import { OktaAuthOptionsInterface } from '../../types';
|
|
13
13
|
export declare function isInteractionRequiredError(error: Error): boolean;
|
|
14
|
-
export declare function isAuthorizationCodeError(sdk:
|
|
14
|
+
export declare function isAuthorizationCodeError(sdk: OktaAuthOptionsInterface, error: Error): boolean | undefined;
|
|
15
|
+
export declare function isRefreshTokenInvalidError(error: unknown): boolean;
|
|
@@ -10,21 +10,21 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
import {
|
|
13
|
+
import { OktaAuthOptionsInterface, OktaAuthOptions } from '../../types';
|
|
14
14
|
export declare function hasTokensInHash(hash: string): boolean;
|
|
15
15
|
export declare function hasAuthorizationCode(hashOrSearch: string): boolean;
|
|
16
16
|
export declare function hasInteractionCode(hashOrSearch: string): boolean;
|
|
17
17
|
export declare function hasErrorInUrl(hashOrSearch: string): boolean;
|
|
18
|
-
export declare function isRedirectUri(uri: string, sdk:
|
|
18
|
+
export declare function isRedirectUri(uri: string, sdk: OktaAuthOptionsInterface): boolean;
|
|
19
19
|
export declare function isCodeFlow(options: OktaAuthOptions): boolean;
|
|
20
20
|
export declare function getHashOrSearch(options: OktaAuthOptions): string;
|
|
21
21
|
/**
|
|
22
22
|
* Check if tokens or a code have been passed back into the url, which happens in
|
|
23
23
|
* the OIDC (including social auth IDP) redirect flow.
|
|
24
24
|
*/
|
|
25
|
-
export declare function isLoginRedirect(sdk:
|
|
25
|
+
export declare function isLoginRedirect(sdk: OktaAuthOptionsInterface): boolean;
|
|
26
26
|
/**
|
|
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:
|
|
30
|
+
export declare function isInteractionRequired(sdk: OktaAuthOptionsInterface, hashOrSearch?: string): boolean;
|
package/lib/oidc/util/oauth.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OktaAuthOptionsInterface, CustomUrls } from '../../types';
|
|
2
2
|
export declare function generateState(): string;
|
|
3
3
|
export declare function generateNonce(): string;
|
|
4
|
-
export declare function getOAuthBaseUrl(sdk:
|
|
5
|
-
export declare function getOAuthDomain(sdk:
|
|
6
|
-
export declare function getOAuthUrls(sdk:
|
|
4
|
+
export declare function getOAuthBaseUrl(sdk: OktaAuthOptionsInterface, options?: CustomUrls): any;
|
|
5
|
+
export declare function getOAuthDomain(sdk: OktaAuthOptionsInterface, options?: CustomUrls): any;
|
|
6
|
+
export declare function getOAuthUrls(sdk: OktaAuthOptionsInterface, options?: CustomUrls): CustomUrls;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { OAuthTransactionMeta,
|
|
2
|
-
export declare function createOAuthMeta(sdk:
|
|
1
|
+
import { OAuthTransactionMeta, OktaAuthOptionsInterface, PKCETransactionMeta, TokenParams } from '../../types';
|
|
2
|
+
export declare function createOAuthMeta(sdk: OktaAuthOptionsInterface, tokenParams: TokenParams): OAuthTransactionMeta | PKCETransactionMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function assertPKCESupport(sdk:
|
|
3
|
-
export declare function validateCodeChallengeMethod(sdk:
|
|
4
|
-
export declare function preparePKCE(sdk:
|
|
5
|
-
export declare function prepareTokenParams(sdk:
|
|
1
|
+
import { OktaAuthFeaturesInterface, OktaAuthOIDCInterface, TokenParams } from '../../types';
|
|
2
|
+
export declare function assertPKCESupport(sdk: OktaAuthFeaturesInterface): void;
|
|
3
|
+
export declare function validateCodeChallengeMethod(sdk: OktaAuthOIDCInterface, codeChallengeMethod?: string): Promise<string>;
|
|
4
|
+
export declare function preparePKCE(sdk: OktaAuthOIDCInterface, tokenParams: TokenParams): Promise<TokenParams>;
|
|
5
|
+
export declare function prepareTokenParams(sdk: OktaAuthOIDCInterface, tokenParams?: TokenParams): Promise<TokenParams>;
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
import {
|
|
14
|
-
export declare function validateClaims(sdk:
|
|
13
|
+
import { OktaAuthOptionsInterface, TokenVerifyParams, UserClaims } from '../../types';
|
|
14
|
+
export declare function validateClaims(sdk: OktaAuthOptionsInterface, claims: UserClaims, validationParams: TokenVerifyParams): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IDToken,
|
|
2
|
-
export declare function verifyToken(sdk:
|
|
1
|
+
import { IDToken, OktaAuthOIDCInterface, TokenVerifyParams } from '../types';
|
|
2
|
+
export declare function verifyToken(sdk: OktaAuthOIDCInterface, token: IDToken, validationParams: TokenVerifyParams): Promise<IDToken>;
|
package/lib/tx/api.d.ts
CHANGED
|
@@ -10,10 +10,9 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
import { AuthTransaction } from './AuthTransaction';
|
|
14
13
|
export declare function transactionStatus(sdk: any, args: any): Promise<any>;
|
|
15
14
|
export declare function resumeTransaction(sdk: any, args: any): any;
|
|
16
|
-
export declare function introspectAuthn(sdk: any, args: any): Promise<
|
|
15
|
+
export declare function introspectAuthn(sdk: any, args: any): Promise<any>;
|
|
17
16
|
export declare function transactionStep(sdk: any, args: any): Promise<any>;
|
|
18
17
|
export declare function transactionExists(sdk: any): boolean;
|
|
19
|
-
export declare function postToTransaction(sdk: any, url: any, args: any, options?: any): Promise<
|
|
18
|
+
export declare function postToTransaction(sdk: any, url: any, args: any, options?: any): Promise<any>;
|
|
@@ -14,7 +14,7 @@ import { CookieOptions } from './Cookies';
|
|
|
14
14
|
import { HttpRequestClient } from './http';
|
|
15
15
|
import { AuthState } from './AuthState';
|
|
16
16
|
import { TransactionManagerOptions } from './Transaction';
|
|
17
|
-
import { IdxTransactionMeta } from '../idx/types';
|
|
17
|
+
import { IdxTransactionMeta, RunOptions } from '../idx/types';
|
|
18
18
|
import { ServiceManagerOptions } from './Service';
|
|
19
19
|
import OktaAuth from '../OktaAuth';
|
|
20
20
|
import { OAuthResponseMode, OAuthResponseType } from './OAuth';
|
|
@@ -86,6 +86,6 @@ export interface OktaAuthOptions extends CustomUrls, Pick<TokenParams, 'issuer'
|
|
|
86
86
|
storageManager?: StorageManagerOptions;
|
|
87
87
|
services?: ServiceManagerOptions;
|
|
88
88
|
transactionManager?: TransactionManagerOptions;
|
|
89
|
-
idx?: Pick<
|
|
89
|
+
idx?: Pick<RunOptions, 'useGenericRemediator' | 'exchangeCodeForTokens'>;
|
|
90
90
|
clientSecret?: string;
|
|
91
91
|
}
|
package/lib/types/Service.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ export interface ServiceInterface {
|
|
|
7
7
|
}
|
|
8
8
|
export interface ServiceManagerInterface {
|
|
9
9
|
isLeader(): boolean;
|
|
10
|
-
start(): void
|
|
11
|
-
stop(): void
|
|
10
|
+
start(): Promise<void>;
|
|
11
|
+
stop(): Promise<void>;
|
|
12
12
|
getService(name: string): ServiceInterface | undefined;
|
|
13
13
|
}
|
|
14
14
|
export interface AutoRenewServiceOptions {
|
|
@@ -15,7 +15,10 @@
|
|
|
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 declare type
|
|
18
|
+
export declare type CustomUserClaimValue = string | boolean | number;
|
|
19
|
+
export declare type CustomUserClaim = CustomUserClaimValue | Record<string, CustomUserClaimValue>;
|
|
20
|
+
export declare type CustomUserClaims = Record<string, CustomUserClaim | CustomUserClaim[]>;
|
|
21
|
+
export declare type UserClaims<T extends CustomUserClaims = CustomUserClaims> = T & {
|
|
19
22
|
auth_time?: number;
|
|
20
23
|
aud?: string;
|
|
21
24
|
email?: string;
|
package/lib/types/api.d.ts
CHANGED
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { AuthTransaction } from '../tx/AuthTransaction';
|
|
13
|
+
import { TransactionState } from '../tx/TransactionState';
|
|
13
14
|
import { Token, Tokens, RevocableToken, AccessToken, IDToken, RefreshToken } from './Token';
|
|
14
15
|
import { JWTObject } from './JWT';
|
|
15
|
-
import { UserClaims } from './UserClaims';
|
|
16
|
+
import { CustomUserClaims, UserClaims } from './UserClaims';
|
|
16
17
|
import { CustomUrls, OktaAuthOptions, TokenParams } from './OktaAuthOptions';
|
|
17
18
|
import { StorageManager } from '../StorageManager';
|
|
18
19
|
import TransactionManager from '../TransactionManager';
|
|
@@ -21,18 +22,34 @@ import { ServiceManagerInterface } from './Service';
|
|
|
21
22
|
import { OktaUserAgent } from '../OktaUserAgent';
|
|
22
23
|
import { AuthenticationOptions, RegistrationOptions as IdxRegistrationOptions, PasswordRecoveryOptions, AccountUnlockOptions, ProceedOptions, CancelOptions, IdxTransaction, IdxTransactionMeta, EmailVerifyCallbackResponse, IdxAuthenticator, ChallengeData, ActivationData, WebauthnEnrollValues, WebauthnVerificationValues, FlowIdentifier, IdxPollOptions, IdxResponse, IntrospectOptions, InteractOptions, InteractResponse, StartOptions } from '../idx/types';
|
|
23
24
|
import { TransactionMetaOptions } from './Transaction';
|
|
24
|
-
|
|
25
|
+
import { RequestData, RequestOptions } from './http';
|
|
26
|
+
import { IdxToPersist, RawIdxResponse } from '../idx/types/idx-js';
|
|
27
|
+
export interface OktaAuthOptionsInterface {
|
|
25
28
|
options: OktaAuthOptions;
|
|
26
29
|
getIssuerOrigin(): string;
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
}
|
|
31
|
+
export interface OktaAuthStorageInterface {
|
|
29
32
|
storageManager: StorageManager;
|
|
33
|
+
}
|
|
34
|
+
export interface OktaAuthHttpInterface extends OktaAuthOptionsInterface, OktaAuthStorageInterface {
|
|
35
|
+
_oktaUserAgent: OktaUserAgent;
|
|
36
|
+
}
|
|
37
|
+
export interface OktaAuthFeaturesInterface {
|
|
38
|
+
features: FeaturesAPI;
|
|
39
|
+
}
|
|
40
|
+
export interface OktaAuthTransactionInterface {
|
|
30
41
|
transactionManager: TransactionManager;
|
|
42
|
+
}
|
|
43
|
+
export interface OktaAuthOIDCInterface extends OktaAuthOptionsInterface, OktaAuthHttpInterface, OktaAuthFeaturesInterface, OktaAuthTransactionInterface {
|
|
44
|
+
token: TokenAPI;
|
|
31
45
|
tokenManager: TokenManagerInterface;
|
|
32
|
-
|
|
46
|
+
}
|
|
47
|
+
export interface OktaAuthIdxInterface extends OktaAuthHttpInterface, OktaAuthTransactionInterface, Pick<OktaAuthOIDCInterface, 'token'> {
|
|
33
48
|
idx: IdxAPI;
|
|
34
|
-
|
|
35
|
-
|
|
49
|
+
}
|
|
50
|
+
export interface OktaAuthInterface extends OktaAuthOptionsInterface, OktaAuthStorageInterface, OktaAuthFeaturesInterface, OktaAuthHttpInterface, OktaAuthTransactionInterface, OktaAuthIdxInterface, OktaAuthOIDCInterface {
|
|
51
|
+
getOriginalUri(): string | undefined;
|
|
52
|
+
serviceManager: ServiceManagerInterface;
|
|
36
53
|
}
|
|
37
54
|
export interface FieldError {
|
|
38
55
|
errorSummary: string;
|
|
@@ -60,6 +77,8 @@ export interface TransactionAPI {
|
|
|
60
77
|
status: (args?: object) => Promise<object>;
|
|
61
78
|
resume: (args?: object) => Promise<AuthTransaction>;
|
|
62
79
|
introspect: (args?: object) => Promise<AuthTransaction>;
|
|
80
|
+
createTransaction: (res?: TransactionState) => AuthTransaction;
|
|
81
|
+
postToTransaction: (url: string, args?: RequestData, options?: RequestOptions) => Promise<AuthTransaction>;
|
|
63
82
|
}
|
|
64
83
|
export interface FingerprintOptions {
|
|
65
84
|
timeout?: number;
|
|
@@ -106,7 +125,7 @@ export interface BaseTokenAPI {
|
|
|
106
125
|
exchangeCodeForTokens(params: TokenParams, urls?: CustomUrls): Promise<TokenResponse>;
|
|
107
126
|
}
|
|
108
127
|
export interface TokenAPI extends BaseTokenAPI {
|
|
109
|
-
getUserInfo(accessToken?: AccessToken, idToken?: IDToken): Promise<UserClaims
|
|
128
|
+
getUserInfo<S extends CustomUserClaims = CustomUserClaims>(accessToken?: AccessToken, idToken?: IDToken): Promise<UserClaims<S>>;
|
|
110
129
|
getWithRedirect: GetWithRedirectAPI;
|
|
111
130
|
parseFromUrl: ParseFromUrlInterface;
|
|
112
131
|
getWithoutPrompt(params?: TokenParams): Promise<TokenResponse>;
|
|
@@ -202,6 +221,7 @@ export interface PkceAPI {
|
|
|
202
221
|
export interface IdxAPI {
|
|
203
222
|
interact: (options?: InteractOptions) => Promise<InteractResponse>;
|
|
204
223
|
introspect: (options?: IntrospectOptions) => Promise<IdxResponse>;
|
|
224
|
+
makeIdxResponse: (rawIdxResponse: RawIdxResponse, toPersist: IdxToPersist, requestDidSucceed: boolean) => IdxResponse;
|
|
205
225
|
authenticate: (options?: AuthenticationOptions) => Promise<IdxTransaction>;
|
|
206
226
|
register: (options?: IdxRegistrationOptions) => Promise<IdxTransaction>;
|
|
207
227
|
recoverPassword: (options?: PasswordRecoveryOptions) => Promise<IdxTransaction>;
|
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": "6.
|
|
5
|
+
"version": "6.6.2",
|
|
6
6
|
"homepage": "https://github.com/okta/okta-auth-js",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"main": "cjs/index.js",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"dev:esm": "NODE_ENV=development yarn build:esm --watch",
|
|
34
34
|
"dev:web": "cross-env NODE_ENV=development webpack --config webpack.config.js --watch",
|
|
35
35
|
"lint": "eslint --ext .js,.ts,.jsx .",
|
|
36
|
-
"tsd": "tsd",
|
|
37
36
|
"lint:report": "eslint -f checkstyle -o ./build2/reports/lint/eslint-checkstyle-result.xml .",
|
|
38
37
|
"validate": "yarn tsc --noEmit && yarn lint && yarn workspace @okta/test.app validate && yarn tsd",
|
|
39
38
|
"test": "yarn test:unit && yarn test:samples && yarn test:e2e",
|
|
@@ -50,6 +49,7 @@
|
|
|
50
49
|
"test:bundle:esm:browser": "cross-env BUNDLE_ENV=browser NODE_OPTIONS=--experimental-vm-modules jest --config ./jest.esm.mjs",
|
|
51
50
|
"test:bundle:esm:node": "cross-env BUNDLE_ENV=node NODE_OPTIONS=--experimental-vm-modules jest --config ./jest.esm.mjs",
|
|
52
51
|
"test:bundle:cjs": "cross-env BUNDLE_ENV=node jest --config ./jest.cjs.js",
|
|
52
|
+
"test:types": "jest --config ./jest.tsd.js --runInBand",
|
|
53
53
|
"build": "node scripts/build.js",
|
|
54
54
|
"build:cdn": "cross-env NODE_ENV=production webpack --config webpack.cdn.config.js",
|
|
55
55
|
"build:web": "cross-env NODE_ENV=production webpack --config webpack.config.js",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@peculiar/webcrypto": "1.1.6",
|
|
90
90
|
"Base64": "1.1.0",
|
|
91
91
|
"atob": "^2.1.2",
|
|
92
|
-
"broadcast-channel": "^4.
|
|
92
|
+
"broadcast-channel": "^4.13.0",
|
|
93
93
|
"btoa": "^1.2.1",
|
|
94
94
|
"core-js": "^3.6.5",
|
|
95
95
|
"cross-fetch": "^3.1.5",
|
|
@@ -116,7 +116,8 @@
|
|
|
116
116
|
"@rollup/plugin-alias": "^3.1.8",
|
|
117
117
|
"@rollup/plugin-babel": "^5.3.0",
|
|
118
118
|
"@rollup/plugin-replace": "^3.0.0",
|
|
119
|
-
"@
|
|
119
|
+
"@tsd/typescript": "^4.6.4",
|
|
120
|
+
"@types/jest": "^27.5.1",
|
|
120
121
|
"@types/node": "^14.0.3",
|
|
121
122
|
"@typescript-eslint/eslint-plugin": "^5.18.0",
|
|
122
123
|
"@typescript-eslint/parser": "^5.18.0",
|
|
@@ -136,8 +137,11 @@
|
|
|
136
137
|
"globby": "^6.1.0",
|
|
137
138
|
"istanbul-instrumenter-loader": "^3.0.1",
|
|
138
139
|
"jasmine-ajax": "^4.0.0",
|
|
139
|
-
"jest": "^
|
|
140
|
+
"jest": "^28.1.0",
|
|
141
|
+
"jest-environment-jsdom": "^28.1.0",
|
|
140
142
|
"jest-junit": "^13.0.0",
|
|
143
|
+
"jest-runner": "^28.1.0",
|
|
144
|
+
"jest-runner-tsd": "^3.0.0",
|
|
141
145
|
"json-loader": "0.5.4",
|
|
142
146
|
"lodash": "4.17.20",
|
|
143
147
|
"rollup": "^2.59.0",
|
|
@@ -145,7 +149,7 @@
|
|
|
145
149
|
"rollup-plugin-license": "^2.6.0",
|
|
146
150
|
"rollup-plugin-typescript2": "^0.30.0",
|
|
147
151
|
"shelljs": "0.8.4",
|
|
148
|
-
"ts-jest": "^
|
|
152
|
+
"ts-jest": "^28.0.2",
|
|
149
153
|
"tsd": "^0.17.0",
|
|
150
154
|
"typescript": "^4.2.3",
|
|
151
155
|
"webpack": "^5.60.0",
|
|
@@ -171,24 +175,10 @@
|
|
|
171
175
|
]
|
|
172
176
|
},
|
|
173
177
|
"tsd": {
|
|
174
|
-
"directory": "test/types"
|
|
175
|
-
"compilerOptions": {
|
|
176
|
-
"skipLibCheck": true,
|
|
177
|
-
"types": [
|
|
178
|
-
"node"
|
|
179
|
-
],
|
|
180
|
-
"lib": [
|
|
181
|
-
"dom"
|
|
182
|
-
],
|
|
183
|
-
"paths": {
|
|
184
|
-
"@okta/okta-auth-js": [
|
|
185
|
-
"./build"
|
|
186
|
-
]
|
|
187
|
-
}
|
|
188
|
-
}
|
|
178
|
+
"directory": "test/types"
|
|
189
179
|
},
|
|
190
180
|
"okta": {
|
|
191
|
-
"commitSha": "
|
|
192
|
-
"fullVersion": "6.
|
|
181
|
+
"commitSha": "877bcc3ff0ff348a2292ddb45b73ed781eefa791",
|
|
182
|
+
"fullVersion": "6.6.2-g877bcc3"
|
|
193
183
|
}
|
|
194
184
|
}
|