Disable anonymous user
This commit is contained in:
		
							parent
							
								
									86bc8d9e1a
								
							
						
					
					
						commit
						3a2d13b3d6
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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 = "")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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) }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue