Integrating Facebook Login with Auth0 using Terraform: A Mixed Experience
Setting up Facebook login for my latest project turned out to be a bit more uncomfortable than anticipated. As someone accustomed to using Entra ID (formerly Azure AD) for business-related authentication, being forced to log in with my personal Facebook account felt fundamentally out of place. Even though this project is technically a hobby, it’s modeled after a business application, and mixing personal credentials with professional infrastructure triggers a sense of unease.
The configuration process itself wasn’t particularly smooth. The Meta (Facebook) developer interface felt disjointed, especially when compared to the more familiar workflows of Microsoft or even Google. The biggest friction point seemed to be related to how the Auth0 domain needed to be specified under the App Domains field. It wasn’t intuitive, and documentation on this specific step was sparse or unclear. Once past that hurdle, the rest of the setup — metadata and contact information — proceeded more predictably.
Unlike Microsoft and Google, Facebook’s integration remains strictly manual. As far as I can tell, there’s no Terraform provider for Facebook, which makes the setup feel even more like traditional “ClickOps.” For infrastructure as code practitioners, this is a notable inconvenience. Similar to working with Google, I had to retrieve the Client ID and Client Secret directly from the Facebook (Meta) app portal and manually input them into my Terraform configuration.
Here’s how I defined the Facebook connection in Auth0:
resource "auth0_connection" "facebook" {
name = "facebook"
strategy = "facebook"
options {
client_id = var.facebook.client_id
client_secret = var.facebook.client_secret
scopes = ["profile", "email"]
}
}
Then, to integrate this connection with my MAUI client application, I added:
resource "auth0_connection_clients" "facebook" {
connection_id = auth0_connection.facebook.id
enabled_clients = [
auth0_client.maui_app.client_id
]
}
The process was straightforward once configured, but the road to that point was not. The lack of automation and the necessity of using a personal Facebook account underscore the broader discomfort of incorporating consumer-grade tools into a project with professional aspirations.
Conclusion
Facebook login does work with Auth0, but the experience leaves something to be desired, especially for developers focused on automation and separation between personal and professional identities.
Until Meta offers a more structured and developer-friendly approach — perhaps through a Terraform provider or support for organizational identities — this setup will remain a compromise.