fix(sso): connexion SSO via l'appairage sur le backend centralisé (2.17.0)
This commit is contained in:
@@ -69,8 +69,14 @@ class MainActivity : FragmentActivity() {
|
|||||||
// Parse intent ONCE, before composition (avoids re-execution on recomposition)
|
// Parse intent ONCE, before composition (avoids re-execution on recomposition)
|
||||||
val shareData = parseShareIntent(intent)
|
val shareData = parseShareIntent(intent)
|
||||||
|
|
||||||
// Check if user is already logged in to skip login screen for share intents
|
// Check if user is already logged in to skip login screen for share intents.
|
||||||
val hasValidToken = tokenManager.getToken() != null && tokenManager.getBaseUrl() != null
|
// Logged in = a stored API secret (manual or paired) + a base URL.
|
||||||
|
// Never use the legacy `jwt_token` slot here: no server token is ever
|
||||||
|
// stored (see TokenManager), so it is always null and used to force
|
||||||
|
// the login screen on every cold start.
|
||||||
|
val hasValidToken =
|
||||||
|
!tokenManager.getApiSecret().isNullOrBlank() &&
|
||||||
|
tokenManager.getBaseUrl() != null
|
||||||
val startDestination = if (hasValidToken) {
|
val startDestination = if (hasValidToken) {
|
||||||
com.shaarit.presentation.nav.Screen.Feed.createRoute()
|
com.shaarit.presentation.nav.Screen.Feed.createRoute()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user