Skip to content

Commit 51e438a

Browse files
fix: #728
Use same storage regardless of flow in sample The "smart" way to select a different storage type in the sample was causing issues. Sometimes the `setStorage(localStorage)` call would be made just before the _first_ time someone uses Code Flow which after the redirect causes the app to look in `sessionStorage` for the nonce (which it wont find as the initiation of Code Flow still used the localStorage). This fix changes it to always use the same storage type, which gives more reliable results. (I did consider further tweaking the "smart" way to select the right storage, but it's super hard to predict in which order(s) users will swap between flow types in the sample). See also: #728 (comment) Fixes #728
1 parent 8d152c2 commit 51e438a

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

projects/sample/src/app/app.component.ts

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export class AppComponent {
4545

4646
private configureImplicitFlow() {
4747
this.oauthService.configure(authConfig);
48-
this.oauthService.setStorage(localStorage);
4948
// this.oauthService.tokenValidationHandler = new JwksValidationHandler();
5049

5150
this.oauthService.loadDiscoveryDocumentAndTryLogin().then(_ => {

0 commit comments

Comments
 (0)