File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ import type {
13
13
CreateOrgURLOptions ,
14
14
RegisterURLOptions ,
15
15
LoginURLOptions ,
16
- PKCEClientOptions ,
16
+ BrowserPKCEClientOptions ,
17
17
} from '../types.js' ;
18
18
19
- const createAuthCodeWithPKCEClient = ( options : PKCEClientOptions ) => {
19
+ const createAuthCodeWithPKCEClient = ( options : BrowserPKCEClientOptions ) => {
20
20
const { featureFlags, tokenClaims } = utilities ;
21
- const sessionManager = new BrowserSessionManager ( ) ;
21
+ const sessionManager = options . sessionManager ?? new BrowserSessionManager ( ) ;
22
22
const client = new AuthCodeWithPKCE ( options ) ;
23
23
24
24
/**
Original file line number Diff line number Diff line change 1
1
import createAuthCodeWithPKCEClient from './authcode-with-pkce.js' ;
2
2
import { isBrowserEnvironment } from '../../environment.js' ;
3
- import type { PKCEClientOptions } from '../types.js' ;
3
+ import type { BrowserPKCEClientOptions } from '../types.js' ;
4
4
5
- export const createKindeBrowserClient = ( options : PKCEClientOptions ) => {
5
+ export const createKindeBrowserClient = ( options : BrowserPKCEClientOptions ) => {
6
6
if ( ! isBrowserEnvironment ( ) ) {
7
7
throw new Error ( 'this method must be invoked in a browser environment' ) ;
8
8
}
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ import type {
6
6
AuthorizationCodeOptions ,
7
7
AuthURLOptions ,
8
8
} from '../oauth2-flows/index.js' ;
9
+ import { type SessionManager } from "../session-managers" ;
10
+
11
+ export interface BrowserPKCEClientOptions extends AuthorizationCodeOptions {
12
+ sessionManager ?: SessionManager
13
+ }
9
14
10
15
export interface PKCEClientOptions extends AuthorizationCodeOptions { }
11
16
export interface CCClientOptions extends ClientCredentialsOptions { }
You can’t perform that action at this time.
0 commit comments