Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class FirebaseManager: NSObject {
- static let databbaseRef = Database.database().reference()
- static var currentUserId:String = ""
- static var currentUser:User?
- static func Login(email:String, password:String, completion: @escaping (_ success:Bool) -> Void) {
- Auth.auth().signIn(withEmail: email, password: password, completion: { (user,error) in
- if let error = error {
- print(error.localizedDescription)
- completion(false)
- } else {
- currentUser = user
- currentUserId = (user?.uid)!
- completion(true) }
- static var currentUser:User?
- static var currentUser: FirebaseAuth.User?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement