We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d152c2 commit 9e257d0Copy full SHA for 9e257d0
projects/lib/src/oauth-service.ts
@@ -1629,11 +1629,11 @@ export class OAuthService extends AuthConfig implements OnDestroy {
1629
const sessionState = parts['session_state'];
1630
1631
if (!options.preventClearHashAfterLogin) {
1632
- const href = location.href
1633
- .replace(/[&\?]code=[^&\$]*/, '')
+ const href = location.origin + location.pathname +
+ location.search.replace(/[&\?]code=[^&\$]*/, '')
1634
.replace(/[&\?]scope=[^&\$]*/, '')
1635
.replace(/[&\?]state=[^&\$]*/, '')
1636
- .replace(/[&\?]session_state=[^&\$]*/, '');
+ .replace(/[&\?]session_state=[^&\$]*/, '') + location.hash;
1637
1638
history.replaceState(null, window.name, href);
1639
}
0 commit comments