I have to enter a security code every time I log into Facebook.
When you're using two-factor authentication or getting alerts about logins we don't recognize, we need to be able to remember your computer and web browser information so we can recognize it the next time you try logging in. Some web browser features block this. If you turned on private browsing or set up your browser to clear your history every time it closes, you might have to enter a security code every time you log in. Learn more.
If your web browser includes a private browsing or incognito mode, using it to access Facebook will usually cause this to happen after closing your browser window.