diff --git a/lib/OktaAuth.ts b/lib/OktaAuth.ts index dd886ad5f..85caef6ba 100644 --- a/lib/OktaAuth.ts +++ b/lib/OktaAuth.ts @@ -96,7 +96,9 @@ import { AuthStateManager } from './AuthStateManager'; import StorageManager from './StorageManager'; import TransactionManager from './TransactionManager'; import { buildOptions } from './options'; -import { +import { + interact, + introspect as introspectV2, authenticate, cancel, register, @@ -242,6 +244,8 @@ class OktaAuth implements SDKInterface, SigninAPI, SignoutAPI { // IDX this.idx = { + interact: interact.bind(null, this), + introspect: introspectV2.bind(null, this), authenticate: authenticate.bind(null, this), register: register.bind(null, this), cancel: cancel.bind(null, this), diff --git a/lib/idx/index.ts b/lib/idx/index.ts index c949a3810..c3036ec57 100644 --- a/lib/idx/index.ts +++ b/lib/idx/index.ts @@ -13,6 +13,8 @@ export * from './authenticate'; export * from './cancel'; +export * from './interact'; +export * from './introspect'; export * from './register'; export * from './recoverPassword'; export * from './handleInteractionCodeRedirect'; diff --git a/lib/idx/introspect.ts b/lib/idx/introspect.ts index 163266e4c..9fe3a48fd 100644 --- a/lib/idx/introspect.ts +++ b/lib/idx/introspect.ts @@ -16,7 +16,7 @@ import { IdxResponse, RawIdxResponse } from './types/idx-js'; import { getOAuthDomain } from '../oidc'; import { IDX_API_VERSION } from '../constants'; -interface IntrospectOptions { +export interface IntrospectOptions { interactionHandle: string; stateHandle?: string; } diff --git a/lib/types/api.ts b/lib/types/api.ts index b3ddeee33..2c114b90d 100644 --- a/lib/types/api.ts +++ b/lib/types/api.ts @@ -28,7 +28,9 @@ import { IdxOptions, IdxTransaction, } from '../idx/types'; - +import { InteractOptions, InteractResponse } from '../idx/interact'; +import { IntrospectOptions } from '../idx/introspect'; +import { IdxResponse } from '../idx/types/idx-js'; export interface OktaAuth { options: OktaAuthOptions; getIssuerOrigin(): string; @@ -250,6 +252,8 @@ export interface PkceAPI { } export interface IdxAPI { + interact: (options?: InteractOptions) => Promise; + introspect: (options?: IntrospectOptions) => Promise; authenticate: (options: AuthenticationOptions) => Promise; register: (options: IdxRegistrationOptions) => Promise; cancel: (options?: CancelOptions) => Promise;