Skip to content

Commit 948f517

Browse files
Merge pull request #660 from axle-h/master
Fixed not using config.openUri in code flow
2 parents 76c5eb3 + 7feca76 commit 948f517

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

projects/lib/src/oauth-service.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -2204,13 +2204,12 @@ export class OAuthService extends AuthConfig implements OnDestroy {
22042204
throw new Error('loginUrl must use Http. Also check property requireHttps.');
22052205
}
22062206

2207-
this.createLoginUrl(additionalState, '', null, false, params).then(function (url) {
2208-
location.href = url;
2209-
})
2210-
.catch(error => {
2211-
console.error('Error in initAuthorizationCodeFlow');
2212-
console.error(error);
2213-
});
2207+
this.createLoginUrl(additionalState, '', null, false, params)
2208+
.then(this.config.openUri)
2209+
.catch(error => {
2210+
console.error('Error in initAuthorizationCodeFlow');
2211+
console.error(error);
2212+
});
22142213
}
22152214

22162215
protected async createChallangeVerifierPairForPKCE(): Promise<[string, string]> {

0 commit comments

Comments
 (0)