Disable anonymous user

This commit is contained in:
Tibo De Peuter 2023-04-18 14:28:55 +02:00
parent 86bc8d9e1a
commit 3a2d13b3d6
2 changed files with 2 additions and 2 deletions

View file

@ -1,3 +1,3 @@
package be.ugent.sel.studeez.data.local.models
data class User(val id: String = "", val isAnonymous: Boolean = true)
data class User(val id: String = "")

View file

@ -39,7 +39,7 @@ class FirebaseAccountDAO @Inject constructor(
get() = callbackFlow {
val listener =
FirebaseAuth.AuthStateListener { auth ->
this.trySend(auth.currentUser?.let { User(it.uid, it.isAnonymous) } ?: User())
this.trySend(auth.currentUser?.let { User(it.uid) } ?: User())
}
auth.addAuthStateListener(listener)
awaitClose { auth.removeAuthStateListener(listener) }