File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -295,7 +295,7 @@ export abstract class AuthCodeAbstract {
295
295
state,
296
296
...rest
297
297
} = options . authUrlParams ;
298
-
298
+
299
299
searchParamsObject = { ...rest , ...searchParamsObject } ;
300
300
301
301
if ( lang ) {
Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ export class AuthCodeWithPKCE extends AuthCodeAbstract {
48
48
this . codeVerifier = verifier ;
49
49
50
50
const providedState = options . state ?? options . authUrlParams ?. state ;
51
-
51
+
52
52
this . state = providedState ?? utilities . generateRandomString ( ) ;
53
-
53
+
54
54
const setItem = isBrowserEnvironment ( )
55
55
? ( sessionManager as unknown as BrowserSessionManager ) . setSessionItemBrowser
56
56
: sessionManager . setSessionItem ;
Original file line number Diff line number Diff line change @@ -37,14 +37,14 @@ export class AuthorizationCode extends AuthCodeAbstract {
37
37
options : AuthURLOptions = { }
38
38
) : Promise < URL > {
39
39
const providedState = options . state ?? options . authUrlParams ?. state ;
40
-
40
+
41
41
this . state =
42
42
providedState ??
43
43
( ( await sessionManager . getSessionItem (
44
44
AuthorizationCode . STATE_KEY
45
45
) ) as string ) ??
46
46
utilities . generateRandomString ( ) ;
47
-
47
+
48
48
await sessionManager . setSessionItem ( AuthorizationCode . STATE_KEY , this . state ) ;
49
49
const authURL = new URL ( this . authorizationEndpoint ) ;
50
50
const authParams = this . generateAuthURLParams ( options ) ;
Original file line number Diff line number Diff line change 26
26
"postbuild" : " node sdk-version.js clean && ncp ./package-cjs.json ./dist-cjs/package.json && ncp ./package-esm.json ./dist/package.json" ,
27
27
"prebuild" : " node sdk-version.js && rimraf dist dist-cjs lib/models lib/apis" ,
28
28
"lint" : " eslint . && prettier . --check" ,
29
- "lint:fix" : " eslint --fix . && prettier . --check " ,
29
+ "lint:fix" : " eslint --fix . && prettier . --write " ,
30
30
"test" : " jest --passWithNoTests" ,
31
31
"lint-staged" : " lint-staged" ,
32
32
"husky" : " husky install" ,
You can’t perform that action at this time.
0 commit comments