Skip to content

Commit 8fa99ff

Browse files
committed
fix(session state): save session_state also when using code flow
1 parent f297a2d commit 8fa99ff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

projects/lib/src/oauth-service.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1489,6 +1489,8 @@ export class OAuthService extends AuthConfig implements OnDestroy {
14891489
const code = parts['code'];
14901490
const state = parts['state'];
14911491

1492+
const sessionState = parts['session_state'];
1493+
14921494
if (!options.preventClearHashAfterLogin) {
14931495
const href = location.href
14941496
.replace(/[&\?]code=[^&\$]*/, '')
@@ -1524,6 +1526,7 @@ export class OAuthService extends AuthConfig implements OnDestroy {
15241526
if (code) {
15251527
return new Promise((resolve, reject) => {
15261528
this.getTokenFromCode(code, options).then(result => {
1529+
this.storeSessionState(sessionState);
15271530
resolve();
15281531
}).catch(err => {
15291532
reject(err);

0 commit comments

Comments
 (0)