Skip to content

Commit

Permalink
🚑 Fix auto logout (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
jheubuch authored Nov 26, 2023
1 parent d65a911 commit 607d705
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import androidx.lifecycle.MutableLiveData
import com.jcloquell.androidsecurestorage.SecureStorage
import de.hbch.traewelling.BuildConfig
import de.hbch.traewelling.R
import de.hbch.traewelling.api.TraewellingApi
import de.hbch.traewelling.api.getGson
import de.hbch.traewelling.api.models.webhook.WebhookCreateResponse
import de.hbch.traewelling.api.models.webhook.WebhookUserCreateRequest
Expand Down Expand Up @@ -182,6 +183,7 @@ class LoginActivity : ComponentActivity() {
secureStorage.storeObject(SharedValues.SS_JWT, response.accessToken!!)
secureStorage.storeObject(SharedValues.SS_REFRESH_TOKEN, response.refreshToken ?: "")
secureStorage.storeObject(SharedValues.SS_NOTIFICATIONS_ENABLED, notificationsEnabled)
TraewellingApi.jwt = response.accessToken!!
if (notificationsEnabled) {
val webhookResponse = getGson().fromJson(
response.additionalParameters["webhook"],
Expand Down

0 comments on commit 607d705

Please sign in to comment.