File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1699,11 +1699,14 @@ export class OAuthService extends AuthConfig implements OnDestroy {
1699
1699
const sessionState = parts [ 'session_state' ] ;
1700
1700
1701
1701
if ( ! options . preventClearHashAfterLogin ) {
1702
- const href = location . href
1703
- . replace ( / [ & \? ] c o d e = [ ^ & \$ ] * / , '' )
1704
- . replace ( / [ & \? ] s c o p e = [ ^ & \$ ] * / , '' )
1705
- . replace ( / [ & \? ] s t a t e = [ ^ & \$ ] * / , '' )
1706
- . replace ( / [ & \? ] s e s s i o n _ s t a t e = [ ^ & \$ ] * / , '' ) ;
1702
+ const href = location . origin + location . pathname +
1703
+ location . search . replace ( / c o d e = [ ^ & \$ ] * / , '' )
1704
+ . replace ( / s c o p e = [ ^ & \$ ] * / , '' )
1705
+ . replace ( / s t a t e = [ ^ & \$ ] * / , '' )
1706
+ . replace ( / s e s s i o n _ s t a t e = [ ^ & \$ ] * / , '' )
1707
+ . replace ( / ^ \? & / , '?' )
1708
+ . replace ( / & $ / , '' )
1709
+ . replace ( / ^ \? $ / , '' ) + location . hash ;
1707
1710
1708
1711
history . replaceState ( null , window . name , href ) ;
1709
1712
}
You can’t perform that action at this time.
0 commit comments