Skip to content

Commit 7feca76

Browse files
author
ahaslehurst
committed
Fixed not using config.openUri in code flow
1 parent a1652dc commit 7feca76

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

projects/lib/src/oauth-service.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2168,13 +2168,12 @@ export class OAuthService extends AuthConfig implements OnDestroy {
21682168
throw new Error('loginUrl must use Http. Also check property requireHttps.');
21692169
}
21702170

2171-
this.createLoginUrl(additionalState, '', null, false, params).then(function (url) {
2172-
location.href = url;
2173-
})
2174-
.catch(error => {
2175-
console.error('Error in initAuthorizationCodeFlow');
2176-
console.error(error);
2177-
});
2171+
this.createLoginUrl(additionalState, '', null, false, params)
2172+
.then(this.config.openUri)
2173+
.catch(error => {
2174+
console.error('Error in initAuthorizationCodeFlow');
2175+
console.error(error);
2176+
});
21782177
}
21792178

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

0 commit comments

Comments
 (0)