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:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user