Browse Source
Merge pull request #22853 from abpframework/issue/22850
Angular - Fixing the garbage query problem in the code flow
pull/22872/head
Yağmur Çelik
9 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
7 additions and
8 deletions
-
npm/ng-packs/packages/oauth/src/lib/strategies/auth-code-flow-strategy.ts
|
|
|
@ -50,14 +50,13 @@ export class AuthCodeFlowStrategy extends AuthFlowStrategy { |
|
|
|
const location = this.windowService.window.location; |
|
|
|
const history = this.windowService.window.history; |
|
|
|
|
|
|
|
const href = |
|
|
|
location.origin + |
|
|
|
location.pathname + |
|
|
|
location.search |
|
|
|
.replace(/iss=[^&$]*/, '') |
|
|
|
.replace(/culture=[^&$]*/, '') |
|
|
|
.replace(/ui-culture=[^&$]*/, '') + |
|
|
|
location.hash; |
|
|
|
const query = location.search |
|
|
|
.replace(/([?&])iss=[^&]*&?/, '$1') |
|
|
|
.replace(/([?&])culture=[^&]*&?/, '$1') |
|
|
|
.replace(/([?&])ui-culture=[^&]*&?/, '$1') |
|
|
|
.replace(/[?&]+$/, ''); |
|
|
|
|
|
|
|
const href = location.origin + location.pathname + query + location.hash; |
|
|
|
|
|
|
|
history.replaceState(null, '', href); |
|
|
|
} |
|
|
|
|