⚠️ Important: The screenshots and step-by-step instructions on this page
reflect the interface as of December 30, 2025. Third-party services like Google, Facebook,
and Microsoft frequently update their user interfaces. While the general process remains
similar, the exact screens, button labels, and menu locations may differ from what you see.
If you encounter significant differences, consult the provider's official documentation.
This guide walks you through setting up Facebook OAuth authentication
for your site.
Quick Setup (Already Have Credentials?)
If you already have a Facebook App ID and Secret, just add them to appsettings.json:
For Development: Use User Secrets instead of appsettings.json:
dotnet user-secrets set "Authentication:Facebook:AppId" "your-app-id"
dotnet user-secrets set "Authentication:Facebook:AppSecret" "your-app-secret"
Going Live (Production)
Production Requirement:
In development mode, only users with roles on the app (developers, testers, admins) can log in.
To allow any Facebook user to log in:
Go to App settings → Basic
Fill in required fields: Privacy Policy URL, App Icon, Category
Toggle the app from Development to Live in the top navigation
Note: For basic login with email and public_profile,
App Review is typically not required - just switching to Live mode is sufficient.
Troubleshooting
Error: Can't Load URL
The domain of your redirect URI isn't in the list of valid OAuth redirect URIs.
Add it in Facebook Login Settings.
Error: App Not Setup
The app is in development mode and the user isn't a tester.
Add them as a tester in App Roles, or switch the app to Live mode.
Error: Invalid App ID
Check that your App ID is correct and the app hasn't been deleted.
User Cancels Login
If the user clicks "Cancel" on the Facebook login dialog, they are gracefully
redirected back to the login page with a message "Facebook login was cancelled."