Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ constructor(
}
}

fun isCurrentRefreshTokenActive() = isTokenActive(accountManager.getPassword(findAccount()))
fun isCurrentRefreshTokenActive(): Boolean {
val account = findAccount() ?: return false
return isTokenActive(accountManager.getPassword(account))
}

private fun buildOAuthPayload(grantType: String) =
mutableMapOf(
Expand Down Expand Up @@ -188,6 +191,7 @@ constructor(
account.type,
accountManager.peekAuthToken(account, AUTH_TOKEN_TYPE),
)
secureSharedPreference.deleteCredentials()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain what was happening before this line was added.

Copy link
Member Author

@FikriMilano FikriMilano Aug 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this 1 line change, and while the other new changes are implemented:

When user logs out, app navigates to login page but then immiediately goes back to the hope page, because all this time, the user credentials stays even after log out where it should have been deleted.

Result.success(true)
} else {
Result.success(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ open class LoginActivity : BaseMultiLanguageActivity() {
) {
navigateToPinLogin(launchSetup = false)
}
} else {
if (loginActivity.isRefreshTokenActive()) updateNavigateHome(true)
}
viewModelScope.launch { contentCache.invalidate() }
navigateToHome.observe(loginActivity) { launchHomeScreen ->
Expand Down
Loading