Connexion SSO via l'appairage sur le backend centralisé (2.17.0) #5
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user