How to Log Into Facebook If You Have Lost Access to Code Generator
Whatsapp Pinterest

Facebook offers many layers of security and if you value your account, you should apply all of them. You can use a secure password, add your mobile phone number/s for a potential recovery, set up trusted contacts, login alerts, login approvals, and code generator.

Unlock the free "Facebook Security Checklist" now!

This will sign you up to our newsletter

Enter your Email

This system can break down when you get logged out of Facebook and lose access to your recovery options. For example, what if you can’t log into Facebook on your new computer because you don’t have access to the Code Generator on your phone?

You can turn to several tools to recover your Facebook account How to Recover Your Facebook Account When You Can No Longer Log In How to Recover Your Facebook Account When You Can No Longer Log In Did you forget your password and can no longer log in? Or was your account hacked? Here's how you can recover your Facebook account. Read More . In this article we will focus on Login Approvals and your options when you’ve lost your phone 6 Best Apps to Use When You've Lost Your Android Phone 6 Best Apps to Use When You've Lost Your Android Phone It's amazing how even the most organised individuals can occasionally find themselves up that notorious creek without a paddle. Plan B is the application to install when your phone is already missing. However, if you're... Read More .

What Are Login Approvals?

Login Approvals are Facebook’s version of two-factor authentication. Normally, you only need your password and your username or email address to log into your Facebook account. Now, let’s say someone knows your email address, then all they need is to crack your password Test Your Password Strength with the Same Tool Hackers Use Test Your Password Strength with the Same Tool Hackers Use Is your password secure? Tools that assess your password strength have poor accuracy, meaning that the only way to really test your passwords is to try to break them. Let's look at how. Read More and that’s easier than you may think.

Once you enable Login Approvals, you’re adding an extra layer of security. Whenever you try to log into Facebook from a new location or device, Facebook will ask you for a security code to complete the login. A security code can be obtained in three different ways:

  1. From a text message to your mobile number.
  2. From Code Generator in the Facebook mobile app, which automatically generates a fresh code every 30 seconds.
  3. From a downloaded set of backup codes.

So even if someone manages to crack your password, they won’t be able to log in without a security code.

Note that up to two of the methods above depend on your phone. If you do proceed with enabling Login Approvals, make sure you have a backup plan for the case that you lose your phone. More on that below.

How to Set Up Login Approvals and Code Generator

To enable Login Approvals, open Facebook in your browser, click the arrowhead in the top right to expand the navigation menu, and go to Settings > Security > Login Approvals. Here, check Require a security code to access my account from unknown browsers, make sure your mobile number is up to date, and click Save Changes.

Facebook Login Approvals

Code Generator is a convenient way to access login approval codes without a mobile number. This can be useful when you’re traveling or don’t have mobile reception. Code Generator is available inside the Facebook app for iOS and Android. The Windows Store app mimics the Facebook website and doesn’t include Code Generator. To set up Code Generator from your browser, go to Facebook > Settings > Security > Code Generator, click Enable, and follow the on-screen instructions.

Facebook Security Codes

Once Code Generator is activated on your mobile device, you’ll need to test it in your browser to fully activate the feature.

Facebook Test Code Generator

Note that after enabling Login Approvals, you might need a security code the next time you want to access your Facebook app. This first code will be sent to your mobile number.

What If You Lose Your Phone?

When you’ve set up your phone to be the key to your Facebook account, losing or breaking it could be a problem. Here’s what you can do to prepare for or recover from this Facebook disaster 5 Things You Can Do NOW To Secure Your Facebook Account & Make It Recoverable 5 Things You Can Do NOW To Secure Your Facebook Account & Make It Recoverable To most of us this is the biggest nightmare. You want to log into your Facebook account and your password no longer works. In the worst of cases, someone managed to hack your account and... Read More .

Save Login Approval Codes as a Backup

After setting up Login Approvals, head to your Facebook Security Settings and save a set of Login Approval Codes as a backup. You can print the codes to keep a physical copy, prepare a digital copy, for example a screenshot, and store it in a safe location, or copy the codes to your LastPass vault.

Facebook Login Approvals Codes

Should you ever not have access to your phone, you can use one of these codes to log into Facebook from a new device or location.

Remember Trusted Devices

Whenever you log into Facebook from a new device, application, or browser, you will be asked whether you would like to save it. When you log into Facebook from a recognized device and location, you won’t be asked for a login approval code. In case you lose your phone, this could be your private backdoor into your Facebook account.

Facebook Remember Browser

Do use this option on at least one device that you are unlikely to lose and likely to have access to, other than your phone. Only ever let Facebook remember devices and locations that are private and safe. And frequently review your list of Recognized Devices and Remove items that are outdated.

Log In From a Recognized Device & End Facebook Session

So it happened, you lost your phone and you didn’t back up any security codes. If you want to log into Facebook from a new location, you’re in trouble. Before this happens, however, you can log into Facebook from a recognized location, as described above. This could be the browser on your desktop computer or the Facebook app on your tablet.

The first thing you should do to prevent access to your Facebook account from the lost phone — in case you didn’t log out of the app — is terminate the app’s Facebook session. If you registered your phone via the phone number, go to Facebook > Settings > Mobile > Lost your phone? and click the Log Out on Phone button.

Facebook Lost Phone

At this point, you should Remove the number of the lost phone.

Should you have lost a device other than your phone or did you not set up your mobile number, here’s another way to terminate a Facebook session How To Log Yourself Out Of Facebook On Other Devices And Improve Your Security [Weekly Facebook Tips] How To Log Yourself Out Of Facebook On Other Devices And Improve Your Security [Weekly Facebook Tips] For many Facebook users, it's good to occasionally brush up on your security knowledge and see if there's a better way you could be doing things. Despite Facebook's tendency to expose your information as publicly... Read More .

Go to Facebook (on a recognized device) > Settings > Security > Where You’re Logged In, find the respective session and click End Activity. If in doubt, end multiple sessions. This will log you out of your phone’s Android app.

Facebook Session

Until you get your phone back or can set up Code Generator on a new phone, you can save a batch of backup codes as described above. You could also set up another third party app to generate codes. For that second option, go to Facebook > Security Settings > Code Generator and click Set up another way to get security codes. Then follow the on-screen instructions.

Facebook Code Generator

To be safe, also update your Facebook password.

Keep Facebook Safe

Every day, we hear from people who have lost access to their Facebook account. Most of them we can’t help because they failed to set up safety options, had their passwords cracked, and the hackers changed their password and recovery options. If it has come this far, you can only pray that Facebook will help you recover your account.

Don’t let it come this far! It only takes a few minutes to enable Login Approvals and save security codes. Once disaster strikes, you will be prepared.

Have you ever recovered from a Facebook disaster? What happened and how did you get back in? Please share your stories in the comments!

Enjoyed this article? Stay informed by joining our newsletter!

Enter your Email

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Matthew T.
    October 20, 2018 at 10:29 am

    How can i open my facebook with passing authentication codes that i have not opened my facebook account yet.

  2. Corey Eyler
    October 15, 2018 at 12:59 am

    Thanks for finally writing about >How to Log Into Facebook If You Have Lost Access to Code Generator <Loved it!

  3. Kim
    October 4, 2018 at 2:40 am

    I need some serious help! My facebook account was hacked last Saturday. The hacker changed the email on my account and the password so I have no way of accessing my account. I have contacted facebook everyday since and I am able to get as far as the generator code. I am unable to access that on facebook because I cannot get into my account, I have also contacted facebook multiple times about this as well but they just keep sending me the same link over and over again and everytime I get stuck on the generator code. Is there a way to get one if I cant access facebook? I really would love to get back into my account.

    • MaryEllen
      October 8, 2018 at 2:18 am

      I'm having the exact same problem. You do anything this article suggests if you CAN'T log into Facebook.

  4. Haruna Koney
    August 9, 2018 at 10:03 pm

    Evening, I am having a serious problem with my facebook account. I had set code authentication on my facebook and use to get instant code to login anytime I am to use other devices. Suddenly my phone development a software problem so I had to flash it. I downloaded a new facebook app for Android and since then I have not been able to login to my account. My line is on but no code is been sent to me. I need help to keep in touch with my friends.

  5. Georgina Cooper
    August 9, 2018 at 3:18 pm

    I lost my phone and I am not logged in to Facebook on any other apps... I'm in big trouble because I can't get my code generator. Helllllp!!!

  6. Fred
    July 31, 2018 at 5:39 pm

    One of the most useless articles I ever read..
    If all goes fine you don't need an article like this.
    If you cant log in FB makes sure you will not log in you created a new profile out of frustration.
    TXT answers don't come in.
    Photo plus code didnt work.
    Emails give a code without any means.
    And the ever stupid question that's popping up to generate a code in your account that you can't acces.
    FB customer service is non existing despite of the billions they make over your back.
    You could have ended with a very short article mentioning the above. Obviously you won't generate much income out of advertising... But so be it :(

    • Georgia
      August 3, 2018 at 11:54 pm

      So true! So frustrating!!!

    • Hassan
      August 8, 2018 at 4:32 pm

      exactly.. I have lost access too because of these stupid facebook security loop holes

  7. Rizwana
    June 30, 2018 at 5:59 pm

    I really enjoyed reading and got much more to know...but I am going through a really bad Facebook disaster...first I lost access to my phone number and don't have any backup and set up any other security they are asking for codes...and for submitting id I need the same name and DOB that I had added in my Facebook account and for that I don't have any that matches my Facebook info and I desperately need that account ..coz that somewhere related to my life ...I really need back my account ...plzzz help ..

  8. Ly Da
    June 26, 2018 at 3:03 am

    I found your articles truly informative. But sadly, it didn't address my issue. I lost ALL POSSIBLE ACCESS to my account because of 2 Factor Authentication code which is supposedly being sent by SMS to my phone. I have previously removed my mobile number to avoid being in FB database. I have also tried to request thru email but it didn't work too. I also tried the selfie shot with my face and a code they've provided that must be handwritten on a clean sheet of paper. No confirmation or acknowledgment after submitting that. It's a cyclical set of instructions like he chicken and the egg thing and is getting frustrating already. Am facing a.blank wall now. Need suggestions pls. Thanks.

  9. Mike
    June 7, 2018 at 11:13 pm

    I generated a set of log-in approval codes in case I lost my phone and could not receive a code by text. Then my phone bricked. No problem, right? except the codes I saved are all 8 digit codes? Facebook provided 8 digit codes and is asking for 6 digit codes back. What do I do?

  10. Autumn
    April 18, 2018 at 11:22 am

    Got a new phone. Have code generator set up on Facebook. Since i got my new phone it will not allow me to log in. Says that i need to enter code. Well i can’t access code generator. I’m not logged in anywhere else that i could get access. I have submitted both picture of drivers license and also my picture holding the code they gave me. I’m not receiving any text from them. I need access to my account. I have no idea what else to do.

    • riddhi sarvaiya
      May 17, 2018 at 12:02 pm

      same problem. what is the solution?

    • Williams
      June 5, 2018 at 11:17 am

      Hi, I had the same issue until I googled for help which ultimately lead me here. First, I think it's poor of FB to setup the alternative option of uploading IDs and still not respond to it should people need it.
      Well lucky for me, I had (while messing around with fortifying security on my account) saw some recovery codes and just for whatever reason backed it up. That was my saving grace, and wouldn't have remembered if I had not stumbled upon this page (kudos to them).
      But if it helps, perhaps you could patiently use the "Help center" (trust me, that can be daunting) to request for help. Or try locating perhaps a particular browser or a device you've used to access your device previously.
      And when you finally get access into your account, plz endeavor to review the security settings to prevent a reoccurrence.!
      Hope this helps!

  11. Michael Dearstyne
    March 9, 2018 at 4:23 pm

    Well I put all the security features into effect minus the codes and when it came down to resseting my password I tried my email address which nothing was sent then verified my identity with trusted friends twice put in a new temporary password and then was prompted to go to the email I used in the trusted friends way and still have not received and email

  12. Nancy
    February 22, 2018 at 5:03 pm

    My FB account was hacked. I changed my password and logged out. When I try to log back into FB, I need a code. I can't get a code texted to my phone because the phone number is incorrect on my FB account. I can't log into FB to change the phone number, because I don't have a code!!! Can't they send me an e-mail with the code???

    • Nicolle
      February 24, 2018 at 6:28 am

      I have the exact same problem. Have you found a solution?

      • Emnet
        April 29, 2018 at 4:48 am

        It won't work

    • Tina Sieber
      February 27, 2018 at 10:51 pm

      Nancy and Nicolle, you need to report your accounts as hacked to initiate an alternative recovery process. You might have to prove your identity to Facebook. This only works if your Facebook profile name is identical (or at least reasonably similar) to your legal name.

      Some readers have reported that emailing a copy of their passport or US driver's license to, along with a description of what had happened, sped up the recovery process. This approach hasn't worked for everyone though, possibly due to a name mismatch.

    • Jamie
      April 13, 2018 at 11:10 am

      I have the very same issue. Extremely frustrating! I have even provided a form of identification to prove myself and I still have not revived a 6 digit code.

  13. Sakshi
    February 17, 2018 at 10:49 am

    have a fb problem about two authentication factor..
    I log in but they replies and asked code generator but I didn't received ..... how to open my fb ... I have mobile number that was registered with in... plz help me ..its about my personal ...I need ur help plz...
    Its a humble request to u

    • Tina Sieber
      February 21, 2018 at 2:03 am

      Code Generator is part of your Facebook mobile app. If you can't access Code Generator, you can ask for an SMS instead. Is that what you did?

      Maybe you didn't set your phone number or prefix/country code correctly? I know it works because I used it several times recently with a non-US mobile phone number.

  14. Chetangoud apatil
    February 2, 2018 at 8:07 pm

    Hello,i lost my mobile and also sim(which is fb number) ,how can i login to my fb account, without having code generator.....plz help me..

  15. Yip
    January 21, 2018 at 9:19 pm

    Hi there,

    The SMS approval code method works some times and not working some times. Some times it took 2 days for the code to come. In this latest time, it did not come at all... it keeps showing Too Many SMS Requests when I only requested twice since it didn't came at first. Saw many other comments and options from the Internet but ALL requires you to be logged into your FB account in order to perform that. The question is, I can't even login into my FB account from any device as I always sign out from all devices after I'm done with my session. My cell phone number is still working and still the same. Just that FB decided not sending the SMS of the approval code this last time.... please enlighten me with any solutions.... appreciate that very much. Thank you

    P/S: the email I used to create my FB account back then is not even active anymore, hence, couldn't even use the Change Password feature....

    • Tina Sieber
      January 22, 2018 at 5:20 am

      I'm afraid I can't help you.

      I've used the SMS approval code method several times recently when I didn't have access to code generator, and it worked like a charm every time. The codes always arrived within seconds of requesting them.

      Could this be an issue with your mobile provider, rather than Facebook? Do you have spotty reception? Are other text messages ever delayed or lost?

      • Yip
        January 22, 2018 at 5:49 am

        Hi, as far as I am concerned, all other SMS are coming in as usual without a problem. It's just the SMS Approval code from FB did not come at all till now. I have even used the option to take selfie with the code provided to verify myself. But to no response at all.

        • Tina Sieber
          January 23, 2018 at 10:20 pm

          I'm sorry you're experiencing these issues and I wish I could help, but unfortunately, I can't. All I know is covered in the article above and in the comments below.

          Happy to learn new details and pass them on to others. So if you manage to recover your account after all, please report back. Good luck and thank you in advance.

    • Isaac Heiss
      October 14, 2018 at 3:26 am

      Same deal!

  16. Chris
    January 11, 2018 at 8:59 am

    Hi there,
    its all good tipps here and nice suggestions.
    Only these are ALL tipps that only work if YOU STILL HAVE ACCESS to your FB-account!

    So what are you going to do if you DID NOT prepare yourself for the nightmare of loosing access to your account? This is exactly what happened to me just the other day: i lost access to my account as FB tells me to enter a security code that has been sent to my mobile which i lost meanwhile - so i have NO ACCESS to these! What am i gonna do now?

    All attempts to change my password, tell FB that i want to regain access identifiying myself thru id, letting them know my account was hacked - everthing failed! No chance to access my account ever again? No eMails get answered via email by FB, instead they send me a message to my Sopport box INSIDE FB - which of course i cant acces either!
    So what am i gonna do? Any suggestion on the worst case?

  17. Mrs. Aung Kyaw Kyaw
    December 28, 2017 at 7:18 pm

    Hi Bro,
    I already suffering a problem with my facebook account.I changed the facebook password and log out all session include my phone.So, I cannot access my code generator and I cannot login.My phone number is already lost.But my verification email address is work.Although,Security code is not sent to my email account.So, Plz help me.Thanks anyway.

    • Lewis
      December 31, 2017 at 7:15 pm

      Same problem as mine....have you found a solution

  18. yaseen
    November 16, 2017 at 12:17 pm

    Hello ... im trying to open my fb account . Username /paswrd is okei but suddenly its appear (login approval code) i didnt lost ma device everythng i have my number my emails ..but i didnt get any code on number ..what should i do help me plz :-(

  19. Jennine
    September 28, 2017 at 9:54 pm

    I have tried everything that Facebook has to offer to recover my account lost yesterday and nothing is working I just keep getting a cycle and it goes no where. Not phone number recovery not changing password, not email code nothing not trusted friends. I am blocked and Facebook is not listening. It is still there they know it but nothing is helping or being done to get my account back nothing at all. Just the same ring around the rosie. Put in a security code emailed it takes me to phone code security get that it takes me to login, put in password says invaild or changed put in new password get the same thing. I am not being recognized at all Yet get emails to my email and phone calls to the number provided but not getting into to recover my account. I try and login and it won't let me says password was changed which I changed and it says it was changed in email but still can't get in. Refused trusted friends like my husband said they are not the ones. Something is wrong and Facebook team, staff is not listening. Sent photos they asked for ID have heard nothing back Still locked out of my 13 year account and all the groups I own and administer and my sale items, my photos, everything. I don't know how or why and yes I had a super long very hard to crack password and it had upper, lower case, characters, numbers it does not work nor do any news ones I was asked to create Now what I sent them emails and have filed consumer complaints with AG of Washington and California sent them certified return reciept letter as well. It is like they deliberately blocked me and refusing to allow me access and don't know why I did nothing at all illegal so what is going on. I am 68 and an associate pastor one group is our church group another group is grieving support group in loss of children and have others. I have not bullied, maligned or bashed anyone, Shared some video footage about the NFL and some personal pet photos. Tuesday evening the 26th. Sept 2017 Wedensday woke to my account blocked and nothing I was asked to do to recover helped. First of all the sent me a text code which does not work to my land line phone. I don't have mobile phone service we live in a dead zone. Finally they sent email saying that had been deactivated but it was never a cell phone number it has always been a land line. They finally sent me email code it did not work it took me to phone code. I finally got them to call me with code put it in and just took me to phone code again. Tried password change get email it was changed. Put new one in and it says not valid it does not work. I am so stressed and upset crying, have headache and not getting help Friends are emailing me about why they don't see me on Facebook, what happened said they can't find me or my photo and account are there but it is not clickable. Something is wrong and without some sort of tech phone help they don't get it their support system is not working at all. It is just a run around and very abusive. I even changed the IP did not help and tried laptop and hubbys computer and sons nada. Don't have mobile phone device or tablets just lap top and Desk top. Others can't get in or see my account or said it is inactive and wonder why. So do I . I did find someone who used my name on an account but no one on it no people or friends. I emailed or called as many friends as able and family notified others of the problem. I am crippled without it and losing income from items trying to sell as well.

  20. Christopher Pettus
    September 28, 2017 at 12:54 pm

    I can't get into my Facebook with any device. Please help I'm very irritated

  21. sagar kumar
    September 27, 2017 at 6:21 am

    i have reset my phone and whenever i try to login the app ask to enter the

  22. sagar kumar
    September 27, 2017 at 6:20 am

    i have reset my phone and whenever i try to login the app ask to enter the code generator. how can i enter a code generator if i my account is nt log in anywhere. and there are not sending any code to my number.

    • Jennine
      September 28, 2017 at 9:54 pm

      I am having the same problem since Sept 27th 2017

    • Julie
      October 8, 2017 at 12:25 pm

      I have this same problem can you tell me if you got back in and if you did how did you please

    • Ceej
      October 18, 2017 at 12:37 pm

      I am having the same problem. Can somebody please help me. I can't log in bec I am not receiving the code. Thank you very much

    • Lewis
      December 31, 2017 at 7:22 pm

      Same to me...they are asking me for login approvals which they are not sending to my phone number... i have a working email address configured to my facebook account,a new passqord yet i cant access my account.

  23. Bijumoni
    September 20, 2017 at 9:28 am

    i have reset my phone and whenever i try to login the app ask to enter the code generator. how can i enter a code generator if i my account is nt log in anywhere. and there are not sending any code to my number.

    • Jennine
      September 28, 2017 at 9:55 pm

      I have the same issue and nothing is working

  24. Shannon Stephens
    September 19, 2017 at 7:40 pm

    I have a new phone and number. I tried logging into FB but it is asking for code generator and sending the code to a number I no longer have. I scanned my ID several times to FB as well as took a photo of myself from the (need help indicator) on login screen but still cannot get access. However with my new number and device every time one of my FB friends update there timeline I get a SMS message so FB has to have my new number

    • Bryan
      November 27, 2017 at 12:29 am

      Did you get it to work? I’m in the same boat. I scanned my ID and took a selfie with the handwritten code and haven’t heard anything for 2 days. I have the same phone and number on my account. But I don’t receive the code when they say it’s sent.

    • Bryan
      November 27, 2017 at 12:32 am

      Did they ever contact you with a code? I have the same number that’s on my account. I still am not receiving the code on my phone. I sent them a pic of my ID and a selfie with the written code. I get no response.

  25. El
    September 5, 2017 at 6:27 pm

    I have a new device but same number, the code generator says it's sending me a code, but I never receive do I add the device if I'm not able to log into account?

    • Tina Sieber
      September 5, 2017 at 6:42 pm

      If you don't have access to Code Generator, you can opt for receiving the code through SMS. I assume that's what you did.

      Is it possible that you used the wrong format for your phone number when you set up your account? Do you remember confirming your number (Facebook offers that option when adding a new number) and did it work?

      I know receiving the code via SMS as an alternative to Code Generator works because I've used it multiple times recently. I received the code on my German SIM card while being in Canada.

      If you have access to Code Generator on another device and the codes it gives you won't work, it might be due to a time mismatch. Let your device to set its time automatically in time and date settings.

      That's all I can really think of. If you do find a solution, please let us know what worked. Thank you!

  26. Antonio poral tangente jr
    August 15, 2017 at 10:46 am

    Hi there!,
    Can you please help me i cannot recover my facebook account i cant get my code generator or my login code through sms could you please send it to me so that i can access my account?my phone number is +xxx...thank you so much!

    • Tina Sieber
      August 15, 2017 at 4:16 pm

      Also removed your phone number from this comment for security and privacy reasons.

  27. Antonio tangente jr
    August 15, 2017 at 9:10 am

    Its been three days that i cannot retrieve my fb account,i cannot access my messenger to contact my trusted contact so how can contact them?the problem then is the code generator did not even send to me as i am waiting over my sms this system really sucks! can i recover my account if i cant even access any?..such a bad days really! tell me how can i get my code generator then to further access my account?..i cant even open an fb app because i cant access over that code code generator as requested!..whew please help me i want to remove that code generator and two way options to trusted contact.i want to have my account back..thanks

    • Tina Sieber
      August 15, 2017 at 4:20 pm

      Code generator does not send text messages unless you request it to. If you asked the Facebook app to text you the code instead, it will use the phone number you specified when you signed up for Facebook. I know this works because I've used it very recently. If your phone number has changed and you didn't update your information, you have to try a different method of logging in or recovering your account.

      • Sultan
        August 21, 2017 at 2:19 am

        Hi Tina, I forgot to change my number on my Facebook account. I didn't even login to my facebook account for quite a while. Now when I am not able to login to facebook, neither through pc nor through app. On PC it asks for code generator, and on app it asks for SMS. Please give me a solution.

        • Tina Sieber
          August 21, 2017 at 6:20 pm

          There is no solution I can give you. You messed up. Try to contact Facebook and if that doesn't work, create a new Facebook account and take better care of it. Good luck!

      • M.imtiaz Ahmad
        March 2, 2018 at 6:23 pm