Skip to content

Commit

Permalink
fix: refresh token with refresh token
Browse files Browse the repository at this point in the history
This commit fixes an issue where the refresh token endpoint was being called with the access token instead of the refresh token.

The `refreshToken()` function now correctly passes the refresh token to the API endpoint.
  • Loading branch information
OkelloSam21 committed Aug 15, 2024
1 parent 20b7810 commit b3676e6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ class AuthRepositoryImpl @Inject constructor(


override suspend fun refreshToken(): Resource<SignInResponse> =
safeApiCall { api.refreshToken(tokenManager.getAccessToken()) }
safeApiCall {
api.refreshToken(tokenManager.getAccessToken())
api.refreshToken(tokenManager.getRefreshToken())
}

override suspend fun signOut() {
tokenManager.clearTokens()
Expand Down

0 comments on commit b3676e6

Please sign in to comment.