Documentation home page
Search...
⌘K
Ask AI
Support
Dashboard
Dashboard
Search...
Navigation
Social Sign In
Sign In with Facebook
Documentation
Reference
Guides
Documentation
Documentation
Community
Blog
Quickstarts
React
Next.js
Vue
Tutorials
React
Next.js
Vue
Database
Configuring Postgres
List of Available Extensions
Performance
AI
Enabling Service
Local Development
Auto-Embeddings
Assistants
Developer Assistant
Authentication
Overview
Users
Social Sign In
Sign In with Apple
Sign In with Discord
Sign In with Facebook
Sign In with GitHub
Sign In with Google
Sign In with LinkedIn
Sign In with Spotify
Sign In with Twitch
Sign In with WorkOS
Social Provider Connect
Email and Password
Magic Links
SMS OTP
WebAuthn and Security Keys
Elevated Permissions
Email Templates
API / Hasura
Configuring Hasura
Permissions
Storage
Overview
CDN
Antivirus
Functions
Overview
Run
Getting Started
Configuration
Networking
Healthchecks
Resources
Registry
Local development
Configuration Overlays
CLI & CI Deployments
CLI
Local Development
Migrate to Nhost Config
Running Multiple Projects
Configuration Overlays
Seeds
On this page
Create Facebook Account
Create Facebook App
Set up Facebook Login
Activate Facebook Permissions and Features
Configure Nhost
Sign In Users
Social Sign In
Sign In with Facebook
Follow this guide to sign in users with Facebook.
Create Facebook Account
Create a new
Facebook account
if you don’t have one already.
Create Facebook App
Go to
Meta for Developers
.
Click
My Apps
in the top right.
Click
Create App
in the top right.
Select your
app type
(e.g. Consumer).
Click
Next
.
Fill in the
Display name
.
Click
Create app
.
Set up Facebook Login
Click on
Add Product
in the left menu.
Click on
Setup
on the Facebook login card.
Don’t
complete the quickstart. Instead, follow the next step.
Click on
Settings
under
Facebook Login
in the left menu.
Make sure
Embedded Browser OAuth Login
is set to
Yes
.
Fill in
Valid OAuth Redirect URIs
with your
OAuth Callback URL
from Nhost.
Click
Save changes
.
Activate Facebook Permissions and Features
To make sure we can fetch all user data (email, profile picture and name). For that we need to enable
email
and
public_profile
permissions.
Click on App Review and Permission and Features in the left menu.
Search for
email
in the
Search Permissions and Features
search box.
Click on Request advanced access and complete the steps.
Search for
public_profile
in the
Search Permissions and Features
search box.
Click on
Request advanced access
and complete the steps.
Configure Nhost
Click
Settings
and then
Basic
in the left menu.
Copy and paste the
App ID (Client ID)
and
App secret (Client Secret)
from Facebook to your Nhost OAuth settings for Facebook. Make sure the OAuth provider is enabled in Nhost.
Click the checkbox “
I have pasted the redirect URI into Facebook”
.
Click
Confirm settings
.
Sign In Users
Use the
Nhost JavaScript client
to sign in users:
Copy
Ask AI
nhost
.
auth
.
signIn
({
provider:
'facebook'
})
Sign In with Discord
Sign In with GitHub
Assistant
Responses are generated using AI and may contain mistakes.