in Education by
I have an application I'm building with Firebase. Essentially, I'm trying to build an authentication system that allows users to sign-up using their e-mail/password and then use that same e-mail/password to log in. While my create users authentication system is working just fine, along with my reset password system that sends password reset links to the designated e-mail address, for some reason or another my login authentication system seems to allow anyone of any e-mail address (signed up or not) to sign-in and essentially be authenticated. To summarize: Upon entering an e-mail or password in my LoginViewController, it immediately segues into the next ViewController regardless of whether the account has previously been created or not. These are the pods I'm using: pod 'Firebase/Database' pod 'Firebase/Auth' pod 'Firebase/Core' pod 'Firebase/Messaging' Here's my code in my LoginViewController for e-mail/password authentication: @IBAction func loginDidTouch(sender: AnyObject) { if let email = textFieldLoginEmail.text, let password = textFieldLoginPassword.text { FIRAuth.auth()?.signInWithEmail(email, password: password, completion: { (user, error) in if error != nil { // There was an error logging in to this account! print("Unsuccessful sign-in") } else { print("Successful login!") self.performSegueWithIdentifier("SuccessfulAuthentication", sender: nil) } }) } } My database rules in my Firebase console: { "rules": { ".read": "auth != null", ".write": "auth != null" } } Also, I'm using the exact same code (with the exception of migrated syntax from Firebase 2.5.1 to Firebase 3.5.2) in another application I've built using Firebase 2.5.1 (Legacy console) and it works exactly as it should and does not log-in any accounts that haven't been created beforehand (sign-up). UPDATE FIXES: Firebase version 3.6.0 (release date: 9/14/16): Improved the behavior of Firebase Authentication when testing apps using the iOS 10 simulator. Fixed an issue with error reporting when a user provides an invalid email address while signing in with an email address and password. See newest release notes here. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Is it possible that you create the segue by ctrl dragging from your login UIButton? If yes, then the segue will be performed regardless whether the authentication was a success or not. You need to make sure when creating the segue in the storyboard that you ctrl+drag the View Controller (I think it's the yellow button at the top of your view controller) not your UIButton

Related questions

0 votes
    It is possible to use email verification with firebase but instead of sending a link they have to click, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 9, 2022 in Education by JackTerrance
0 votes
    Which one of the following statements is false? a) You need to create an account before you can send an e ... password with others. Select the correct answer from above options...
asked Nov 13, 2021 in Education by JackTerrance
0 votes
    My code: PhoneAuthProvider.getInstance().verifyPhoneNumber( phoneNumber, // Phone number to verify 60, // Timeout ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    I am using Firebase authentication and react-redux in my app. I added firebase.auth().onAuthStateChanged to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I am using Firebase authentication and react-redux in my app. I added firebase.auth().onAuthStateChanged to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
0 votes
    If the AD B2B account is e-reference, can an admin block this? Could an admin prevent their users from being guest users in another tenant?...
asked Mar 10, 2021 in Technology by JackTerrance
0 votes
    2.A feature of Microsoft Word which is used to create multiple copies of letters and e-mails is (a) Mail (b) ... merge (d) data source Select the correct answer from above options...
asked Dec 23, 2021 in Education by JackTerrance
0 votes
    Anita has to send an email to Raees. She also wants to send the same e-mail to Vandana but does not want ... email address of Vandana? Select the correct answer from above options...
asked Dec 21, 2021 in Education by JackTerrance
0 votes
    56. What kind of etiquettes is speaking clearly and slowly? (A) e mail (B) telephonic (C) letter (D) none Select the correct answer from above options...
asked Dec 5, 2021 in Education by JackTerrance
0 votes
    Sending an E-mail is similar to- (A) writing a letter (B) drawing a picture (C) talking on the phone (D) ... package (E) None of these Select the correct answer from above options...
asked Dec 2, 2021 in Education by JackTerrance
0 votes
    define chatting and also define E-mail don’t copy from Google Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
0 votes
    56. What kind of etiquettes is speaking clearly and slowly? (A) e mail (B) telephonic (C) letter (D) none Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    What kind of etiquettes are proof reading? (A) reading (B) E mail (C) writing (D) editing Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
...