You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: template-xml/data/src/main/java/co/nimblehq/template/xml/data/service/authenticator/ApplicationRequestAuthenticator.kt
+2-6Lines changed: 2 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -40,14 +40,10 @@ class ApplicationRequestAuthenticator(
40
40
} else {
41
41
retryCount++
42
42
43
-
val tokenType = sessionManager.getTokenType()
44
43
val failedAccessToken = sessionManager.getAccessToken()
45
44
46
45
try {
47
-
val refreshTokenResponse = tokenRefresher.refreshToken().last().copy(
48
-
// refreshToken response doesn't send tokenType
49
-
tokenType = tokenType
50
-
)
46
+
val refreshTokenResponse = tokenRefresher.refreshToken().last()
51
47
val newAccessToken = refreshTokenResponse.accessToken
52
48
53
49
if (newAccessToken.isEmpty() || newAccessToken == failedAccessToken) {
@@ -61,7 +57,7 @@ class ApplicationRequestAuthenticator(
61
57
// Retry this failed request (401) with the new token
0 commit comments