Live Chat

We'll need to share your messages (and your email address if you're logged in) with our live chat provider, Drift. Here's their privacy policy.

If you don't want to do this, you can email us instead at contact@anvil.works.

Connecting Facebook to Anvil

You can allow your users to sign in with Facebook using the Facebook Service.

Follow these steps to configure Facebook to allow Anvil to communicate with it.

Create an app in Facebook for Developers

To connect Anvil with Facebook, you need to create an ‘app’ in Facebook for Developers. For our purposes, this is just a record held by Facebook to inform it of your Anvil app.

If you already have an app in Facebook for Developers that you want to link to Anvil, you can skip this step.

To create a new one, go to https://developers.facebook.com/ and click on ‘get started’. You’re presented with some simple setup steps, fill them in as appropriate.

Add Facebook Login to your Facebook app

After some basic setup steps, you’ll be presented with ‘Add A Product’. Add Facebook Login.

Configure the OAuth redirect URI

In the Facebook Login Product’s Settings, there is a box marked ‘Valid OAuth Redirect URIs’. Add https://anvil.works/apps/_/facebook_auth_callback to it.

Copy the App ID and App Secret into Anvil

Now go to Settings->Basic. Copy the App ID and App Secret for your app.

Add the Facebook Service to your Anvil app from the Anvil Editor, and paste your App ID and App Secret into the appropriate boxes.

Test that it works

Add the Users Service and check the Sign In With Facebook box.

Your login form will now show a ‘Log In With Facebook’ link, which opens the Facebook login dialog when clicked.

Click this link to login with your Facebook account.

You can also use anvil.facebook.auth.login() to present a simple login dialog for only Facebook login. If you use anvil.facebook.auth.login(), your users’ login details are not stored in Anvil’s Data Tables.

Next up

The Microsoft and Google services allow user management with Microsoft and Google Single-Sign-On services in a very similar way.

They also provide integration with Google and Microsoft Azure REST APIs, plus Python bindings for Google Drive and Gmail.