Anonymous Sign-In

Anonymous Sign-In allows users (who haven't signed up yet) to use your app without creating an account.

Prerequisites

Before getting started with this section, ensure you have:

  1. Completed all steps in the Firebase Setup.

  2. Completed Initial setup required for authentication. (Please note: Skip if you have already enabled authentication and created a 'users' collection while creating your project with Firebase Setup.)

Adding Anonymous sign in

Adding Anonymous Sign-In comprises of the following steps:

1. Enabling anonymous authentication in Firebase

To enable Anonymous authentication in the Firebase:

  1. Open the Firebase console and click on Authentication.

  2. Click on the Get started button.

  3. Select the Sign-in method tab.

  4. Click on Anonymous (Under the 'Native Providers' section). If you have already added any other provider, click on the Add new provider and then click on Anonymous.

  5. Find the Anonymous switch and enable it.

  6. Click on the Save button.

2. Adding an anonymous sign-in button

To allow users to authenticate, you need a login page with a button. You can create your own or use the one from the widget template or page template.

Here's how you can add the anonymous sign-in button from our page template:

3. Add login action

When you click the sign-in button, it will trigger the 'Log In' action, redirecting users directly to the home page.

To add login action:

  1. Select the widget (e.g., Button) on which you want to add the action.

  2. Select Actions from the properties panel (the right menu) and select Add Action.

  3. Search and select the Log in (under Backend/Database > Firebase Authentication) action.

  4. Set Auth Provider to Anonymous.

  5. Tick the Create User Document and set the Collection to users. After successful login, this will create the user's entry without any details.

4. Add logout action

To let users log out of your app, you can use this action.

5. Verify user creation

To confirm the successful integration and the creation of users, navigate to your Firebase project > Authentication > Users and check the user entries.


Last Updated Date: August 31, 2023

Last updated