Skip to content

Commit

Permalink
force token to update on refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyabsi committed Jan 7, 2025
1 parent 20b1d3d commit b5dec41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ class HttpClient : BaseClient(), CoroutineScope {
setAuthorization(AuthorizationType.Cookie, "${preferences.authToken} ${preferences.twoFactorToken}")
}

fun setToken() {
setAuthorization(AuthorizationType.Cookie, "${preferences.authToken} ${preferences.twoFactorToken}")
}

interface SessionListener {
fun onSessionInvalidate()
fun noInternet()
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/cc/sovellus/vrcaa/manager/CacheManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ object CacheManager {
listener?.startCacheRefresh()
}

api.setToken()

App.setLoadingText(R.string.loading_text_profile)
api.auth.fetchCurrentUser()?.let { profile = it }

Expand Down

0 comments on commit b5dec41

Please sign in to comment.