> ## Documentation Index
> Fetch the complete documentation index at: https://docs.softr.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign in with SMS Code (deprecated)

> Allow users to sign in with their mobile phone number.

<Warning>On 13th June 2024, we discontinued SMS code as a sign-in method in Softr apps. Don’t worry, **if your apps have SMS sign-in, they’ll continue to work for your users. No action is needed.**</Warning>

<Accordion title="Why did we discontinue SMS sign-in">
  We introduced SMS as sign-in method two years ago. Our product has evolved rapidly since, and we’ve realized that the unique nature of SMS sign-in + our specific implementation created technical debts that prevent us from introducing bigger improvements around user management. Therefore, we made the tough decision to discontinue it.
</Accordion>

<Accordion title="What’ll happen to my existing apps with SMS sign-in in the long-term?">
  For the foreseeable future, we will continue to support your existing apps with SMS sign-in. In the long term, we might either:

  1. Sunset it completely

  2. Offer a new, better version

  In either case, you’ll be notified way beforehand and offered an easy way to migrate, so it won’t create disruption for your users or too much admin burden on you.
</Accordion>

## Overview

<Frame caption="Signin with Phone Code">
  <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/sign-in-with-sms-code-deprecated/image1.png?fit=max&auto=format&n=VxMjh5thxtybPdCf&q=85&s=cd6ff04726325ac97e2ed5cc74f779c7" alt="Signin with Phone Code" width="928" height="824" data-path="add-and-manage-users/images/sign-in-with-sms-code-deprecated/image1.png" />
</Frame>

<Tip>This feature is only available to **Business** users.</Tip>

Using this sign-in block, you can allow your users to log in using their phone number (i.e. receive a verification code via SMS and use that code to sign in). So, let's first review the block settings.
<Tip>The sms code will be valid **for 5 minutes** after being sent.</Tip>

<Frame caption="Block settings">
  <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/sign-in-with-sms-code-deprecated/image2.png?fit=max&auto=format&n=VxMjh5thxtybPdCf&q=85&s=4335b307e17ede01498344d723729b38" alt="Block settings" width="946" height="1120" data-path="add-and-manage-users/images/sign-in-with-sms-code-deprecated/image2.png" />
</Frame>

First of all, you can choose if the sign-in should be available **just for registered users** or for anyone. If the toggle is not enabled, any visitor can enter his/her phone number, receive the code, and log into your Softr app.

Further on, you can change the placeholder text of the two fields (**Phone** and **Sign in Code**) and also the **button labels**.

## **Sign-in process**

Now, let's see how the block works from the user's standpoint. In the first step, the user needs to enter his/her phone number as shown below.
<Tip>Please, note that the block only support phone numbers starting with a \*\*valid country code (\*\*e.g. "+49" for German phone numbers).</Tip>

<Frame caption="Entering phone number">
  <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/sign-in-with-sms-code-deprecated/image3.png?fit=max&auto=format&n=VxMjh5thxtybPdCf&q=85&s=5ab18fb9a0cf31e954ddb6ab16181566" alt="Entering phone number" width="1118" height="776" data-path="add-and-manage-users/images/sign-in-with-sms-code-deprecated/image3.png" />
</Frame>

After submitting the phone number, the user will receive a 6-digit code to his/her mobile phone via SMS and needs to provide that code in the next step to verify his/her account.

<Frame caption="Verifying user account">
  <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/sign-in-with-sms-code-deprecated/image4.png?fit=max&auto=format&n=VxMjh5thxtybPdCf&q=85&s=67cfbdaaf502019e348abb5a26ded4b4" alt="Verifying user account" width="1116" height="834" data-path="add-and-manage-users/images/sign-in-with-sms-code-deprecated/image4.png" />
</Frame>

That's it. As soon as the user submits the verification code, he/she will log in to your Softr app, becoming a verified user.

## **User Creation**

Although, when signing in through this block, the user doesn't provide an email address, the email field is still mandatory and needs to be assigned to the user account. Therefore, every time a user signs in using a phone number, an email address is generated automatically for him/her in the following format:

**[+xxxxxxxx@softr-applicationID.app](mailto:+xxxxxxxx@softr-applicationID.app)**

Here, the **"+xxxxxxxx"** represents the user's phone number, and the **"applicationID"** is replaced by the actual application ID of your Softr app.

## **Syncing with Airtable**

**If you have your users base** [connected to Airtable or any other data source](/add-and-manage-users/pxnkp9H3qyEVMF6XUceqnj/syncing-users-with-a-data-source/hshRGygHr4T33EnaLntGf9)**, the users created via sms verification will be synced to the data source without issues (using the email that was generated automatically upon signin).**

However, let's consider the case when you have a particular user on Airtable but don't have that user in your Softr app and want to sync those two entries as soon as the given user signs in through your Softr app. To make it possible, both entries need to have the exact same email address.

Therefore, on Airtable, your **Email** field should be a **formula** that combines user's phone number and your **application ID** using the format discussed above (**[+xxxxxxxx@softr-applicationID.ap](mailto:+xxxxxxxx@softr-applicationID.ap)**p), so that the result matches exactly the email generated automatically when the user signs in through the Softr app.

<Tip>[Google Sheets](/data-sources/1YYStCJukT15Lh2j93qo9A/google-sheets/jznC9Jr3Jri224AVmHVn4a) doesn’t have an option to use formulas, therefore syncing users this way **will be possible only with Airtable**.</Tip>

In order to set up the formula on Airtable, you first need to get your **Softr Applciation ID**. It can be copied from the URL of your Softr app studio.Below, we show how you can copy it and paste into your Airtable users base.

<Frame caption="Adding App ID to Airtable">
  <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/sign-in-with-sms-code-deprecated/image5.gif?s=a857c29648014fc1ebb479a4f9f3d1a3" alt="Adding App ID to Airtable" width="2880" height="1486" data-path="add-and-manage-users/images/sign-in-with-sms-code-deprecated/image5.gif" />
</Frame>

Further on, let's create the formula that will concatenate user's phone number and Application ID into the required expression. Below, you can see what the formula looks like.

<Frame caption="Creating the formula">
  <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/sign-in-with-sms-code-deprecated/image6.png?fit=max&auto=format&n=VxMjh5thxtybPdCf&q=85&s=d43e8bc069c5fa741dc754c5705f2907" alt="Creating the formula" width="1024" height="840" data-path="add-and-manage-users/images/sign-in-with-sms-code-deprecated/image6.png" />
</Frame>

So, you need to use a **CONCATENATE()** formula, where **\{Phone Number}** is the field where user's phone number is stored and **\{Application ID}** is your Application ID field on Airtable.
