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