Facebook Auth

Introduction

To sign in with Facebook and connect user data with facebook login. It makes user data synced across all user devices which have same facebook login.

Prerequisites

  • Facebook SDK installed in your Unity project

  • Firebase Auth and Firestore configured as explained in Firestore Storage

Setup Facebook Authentication

  1. Obtain Facebook Credentials:

  1. Setup Facebook Authentication in Firebase:

    • Navigate to your Firebase project in the Firebase Console.

    • Click on "Authentication" → "Sign-in method" → enable "Facebook."

    • Enter your Facebook App ID and App Secret.

  • Copy the OAuth URL as shown in the URL above

  • Paste it into your facebook Login with Gaming window settings tab as shown below.

Add The UI In Unity

FB Button

After login, Firebase Auth generates a user identity that Remote Storage uses to scope Firestore documents. We also track a primary device ID to help with multi‑device flows.

Last updated