fix(sso): connexion SSO via l'appairage sur le backend centralisé (2.17.0)

This commit is contained in:
2026-11-16 22:34:27 -05:00
parent af17f0e07f
commit d853f7b837
@@ -69,8 +69,14 @@ class MainActivity : FragmentActivity() {
// Parse intent ONCE, before composition (avoids re-execution on recomposition)
val shareData = parseShareIntent(intent)
// Check if user is already logged in to skip login screen for share intents
val hasValidToken = tokenManager.getToken() != null && tokenManager.getBaseUrl() != null
// Check if user is already logged in to skip login screen for share intents.
// 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) {
com.shaarit.presentation.nav.Screen.Feed.createRoute()
} else {