Streamit Laravel - Documentation
Streamit Laravel

How to OTP login setup?

Steps to Retrieve Firebase Credentials for OTP Login

1.Create a Firebase Project:

  • Go to the Firebase Console.
  • Log in with your Google account.
  • Click on ‘Add Project’ or select an existing project.

2. Add an App to Your Firebase Project:

  • In the Firebase project dashboard, click on the gear icon ⚙️ in the sidebar and go to Project Settings.
  • Scroll to the Your apps section and click on the ‘Add app’ button.
  • Select your platform (e.g., Web) and register the app.

3. Retrieve the Configuration Object:

  • After registering the app, Firebase will provide you with a configuration object.
  • It will look something like this:
const firebaseConfig = {
apiKey: 'your-api-key',
authDomain: 'your-auth-domain.firebaseapp.com',
databaseURL: 'https://your-database-name.firebaseio.com',
projectId: 'your-project-id',
storageBucket: 'your-storage-bucket.appspot.com',
messagingSenderId: 'your-messaging-sender-id',
appId: 'your-app-id',
measurementId: 'your-measurement-id'
};
  • Copy this configuration and save it for your use.

4. Enable Phone Authentication:

  • Go to the Firebase Console and navigate to Build > Authentication > Sign-in method.
  • Enable Phone as a sign-in provider.

5. Set Up OTP Login: