Wire Firebase auth state into settings/logout and refresh Google sign-in config.

This updates the settings account section to show/logout based on authenticated user state, refines auth service naming, and aligns app signing/Firebase config changes needed for successful Google authentication.

Made-with: Cursor
This commit is contained in:
2026-03-01 21:40:58 +01:00
parent 91a9521f3e
commit 28ad63fb4a
10 changed files with 79 additions and 71 deletions

View File

@@ -4,7 +4,7 @@ import org.db3.airmq.sdk.auth.model.AuthProvider
import org.db3.airmq.sdk.auth.model.User
interface AuthService {
suspend fun getCurrentSession(): User?
suspend fun getUser(): User?
suspend fun isAuthenticated(): Boolean
suspend fun signIn(provider: AuthProvider, token: String): Result<User>
suspend fun signOut(): Result<Unit>

View File

@@ -17,7 +17,7 @@ class FirebaseAuthService @Inject constructor(
private val firebaseAuth: FirebaseAuth
) : AuthService {
override suspend fun getCurrentSession(): User? = firebaseAuth.currentUser?.toUser()
override suspend fun getUser(): User? = firebaseAuth.currentUser?.toUser()
override suspend fun isAuthenticated(): Boolean = firebaseAuth.currentUser != null