Skip to content

Commit

Permalink
fixup! refactor(http): separate auth management from client
Browse files Browse the repository at this point in the history
  • Loading branch information
seth2810 committed Jul 30, 2024
1 parent 008a9df commit 903805d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/lib/http/AuthManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class AuthManager {
* @param {number} retryAttempt Number of of retries.
* @returns {string} Returns the refresh token.
*/
private async refreshToken(retryAttempt): Promise<string> {
private async refreshToken(retryAttempt: number): Promise<string> {
if (
!this.config.clientCredentials.clientId ||
!this.config.clientCredentials.clientSecret ||
Expand Down Expand Up @@ -84,7 +84,7 @@ export class AuthManager {
* @param {number} retryAttempt Number of of retries.
* @returns {string} Returns the authorization token.
*/
private async requestToken(retryAttempt): Promise<string> {
private async requestToken(retryAttempt: number): Promise<string> {
const response = await this.client.post(
'/token',
new URLSearchParams({
Expand Down Expand Up @@ -132,9 +132,6 @@ export class AuthManager {
// return already defined access token
return this.config.accessToken;
}

// reset token to force trigger refresh
this.config.accessToken = undefined;
}

// refresh token
Expand Down

0 comments on commit 903805d

Please sign in to comment.