File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
npm/ng-packs/packages/oauth/src/lib/strategies Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,13 @@ export class AuthCodeFlowStrategy extends AuthFlowStrategy {
5050 const location = this . windowService . window . location ;
5151 const history = this . windowService . window . history ;
5252
53- const href =
54- location . origin +
55- location . pathname +
56- location . search
57- . replace ( / i s s = [ ^ & $ ] * / , '' )
58- . replace ( / c u l t u r e = [ ^ & $ ] * / , '' )
59- . replace ( / u i - c u l t u r e = [ ^ & $ ] * / , '' ) +
60- location . hash ;
53+ const query = location . search
54+ . replace ( / ( [ ? & ] ) i s s = [ ^ & ] * & ? / , '$1' )
55+ . replace ( / ( [ ? & ] ) c u l t u r e = [ ^ & ] * & ? / , '$1' )
56+ . replace ( / ( [ ? & ] ) u i - c u l t u r e = [ ^ & ] * & ? / , '$1' )
57+ . replace ( / [ ? & ] + $ / , '' ) ;
58+
59+ const href = location . origin + location . pathname + query + location . hash ;
6160
6261 history . replaceState ( null , '' , href ) ;
6362 }
You can’t perform that action at this time.
0 commit comments