πŸ”’ Authorization

Authorization with Firebase

To set up authorization, start by creating a new project in Firebase:

Create a Firebase project

Go your project on Firebase (opens in a new tab) and create a new project.


Create a Firebase project

iOS Setup

Add a new iOS app

In the Firebase console, add a new iOS app:


Add an iOS app
  1. Register your app – Enter your app’s Bundle ID.

  2. Download the Firebase config file (GoogleService-Info.plist).


Download Firebase config iOS
  1. Open your iOS project in Xcode by running:
npx cap open ios
  1. Put downloaded config file into the root of Xcode project

Put Firebase config iOS

Install Firebase SDK

  1. Open your project in Xcode.

  2. Navigate to File > Add Package Dependencies.

  3. When prompted, enter the Firebase iOS SDK repository URL:

https://github.com/firebase/firebase-ios-sdk
  1. Click Add Package and install the necessary Firebase modules.

Install Firebase package iOS

Google Sign-in method

  1. Enable Google Sign-in in the Firebase authentication settings.

  2. Download the updated Firebase config file and replace the old one in your Xcode project.

Configure Custom URL Schemes in Xcode

To set up URL schemes for Google Sign-in:

  1. Open Xcode and navigate to your project settings.
  2. Select your app from the TARGETS section.
  3. Go to the Info tab and expand the URL Types section.
  4. Click the + button and add a new URL scheme using your REVERSED_CLIENT_ID.
  5. You can find this value in GoogleService-Info.plist under REVERSED_CLIENT_ID.
  6. Copy and paste it into the URL Schemes field.
  7. Leave the other fields blank.

[video explaining how to do that]

Web Setup

Add a new Web app


Add web app

Update values in .env.local

Take these Firebase Auth config values and paste them in your .env.example


Copy paste to env
Env firebase example