Many websites send security codes to your phone number to confirm your identity when signing in. You may use apps that generate security codes on your phone, too. But what happens if you lose your phone? You can try the following methods.

1. Get Your Phone Number Back

Your cellular carrier can help you immediately associate your phone number with another new phone. Even if you don’t want to buy an expensive new phone immediately, you can get a phone to tide you over. You might want to dig an old phone out of your drawers or borrow one from a friend or family member. After you have a phone, your carrier can give you a new SIM card tied to your account and you can instantly regain access to your phone number. All you have to do is go to your cellular carrier’s store and you can get your phone number back.

2. Forward Your Old Phone Number

If you don’t want to get a new phone immediately, you may be able to forward calls from your old phone number to another phone number. Cellular providers let you set up call forwarding so calls directed at your old phone number will be forwarded to a number of your choosing.

However, there’s no way to forward SMS messages, which means you can’t receive those texted security codes. Luckily, many—but not all—services provide the option of calling the phone number they have on file and speaking a security code. That will work with call forwarding. Consult your cellular carrier for more information on setting up call forwarding.

3. Use Your Recovery Codes

Many accounts offer recovery methods, which are ways you can regain access to your account if you ever lose your phone:

Some services offer recovery codes that they encourage you to print out and securely store somewhere. If you’ve printed out recovery codes for an account, now’s the time to use them to sign in to that account.

There are also other ways to regain access to your account. Some services let you enter an additional recovery phone number at which you can receive codes in a pinch. If you’ve provided a recovery phone number—for example, the phone number for your spouse’s phone—you can receive a code at that number to regain access.

Other services even let you remove your two-factor security through email. They’ll send you an email at your registered email address and let you click through a few dialogs to remove the protection and gain access to your account.

4. Wipe Your Lost Phone

Remember that you can use Apple’s Find My iPhone or Google’s Find My Device to view the location of your phone on a map, lock it, and erase its contents. If you’ve given up on getting your phone back, it’s a good idea to send a remote erase command—just in case. This will prevent anyone who finds the phone from seeing your private notifications and other data. Even if the phone is currently offline, it will erase itself if it ever powers on and reconnects to Apple or Google’s servers. You may not get your phone back, but you can rest a little easier knowing your data has been wiped from the phone.

Howtogeek.