File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -11,5 +11,6 @@ export const authConfig: AuthConfig = {
11
11
timeoutFactor : 0.25 , // For faster testing
12
12
sessionChecksEnabled : true ,
13
13
showDebugInformation : true , // Also requires enabling "Verbose" level in devtools
14
- clearHashAfterLogin : false , // https://github.com/manfredsteyer/angular-oauth2-oidc/issues/457#issuecomment-431807040
14
+ clearHashAfterLogin : false , // https://github.com/manfredsteyer/angular-oauth2-oidc/issues/457#issuecomment-431807040,
15
+ nonceStateSeparator : 'semicolon' // Real semicolon gets mangled by IdentityServer's URI encoding
15
16
} ;
Original file line number Diff line number Diff line change @@ -150,8 +150,12 @@ export class AuthService {
150
150
// login(...) should never have this, but in case someone ever calls
151
151
// initImplicitFlow(undefined | null) this could happen.
152
152
if ( this . oauthService . state && this . oauthService . state !== 'undefined' && this . oauthService . state !== 'null' ) {
153
- console . log ( 'There was state, so we are sending you to: ' + this . oauthService . state ) ;
154
- this . router . navigateByUrl ( this . oauthService . state ) ;
153
+ let stateUrl = this . oauthService . state ;
154
+ if ( stateUrl . startsWith ( '/' ) === false ) {
155
+ stateUrl = decodeURIComponent ( stateUrl ) ;
156
+ }
157
+ console . log ( `There was state of ${ this . oauthService . state } , so we are sending you to: ${ stateUrl } ` ) ;
158
+ this . router . navigateByUrl ( stateUrl ) ;
155
159
}
156
160
} )
157
161
. catch ( ( ) => this . isDoneLoadingSubject$ . next ( true ) ) ;
You can’t perform that action at this time.
0 commit comments