Skip to content

Commit 4195f83

Browse files
authored
fix: should call oauth login with correct route (#100)
Fixes #99
1 parent 21809d3 commit 4195f83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/client/oauth-client-credentials-api-client/oauth-client-credentials-api-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class OAuthClientCredentialsClient implements ApiClient {
2929
}
3030

3131
async login(): Promise<BugSplatResponse<OAuthLoginResponse>> {
32-
const url = `${this._host}/oauth2/authorize`;
32+
const route = '/oauth2/authorize';
3333
const method = 'POST';
3434
const body = this.createFormData();
3535
body.append('grant_type', 'client_credentials');
@@ -42,7 +42,7 @@ export class OAuthClientCredentialsClient implements ApiClient {
4242
duplex: 'half'
4343
} as RequestInit;
4444

45-
const response = await this.fetch<LoginResponse>(url, request);
45+
const response = await this.fetch<LoginResponse>(route, request);
4646
const responseJson = await response.json();
4747

4848
if ((responseJson as ErrorResponse).error === 'invalid_client') {

0 commit comments

Comments
 (0)