Auth0 Configuration
- Create an Auth0 account and navigate to the dashboard.
- Go to Dashboard > Applications and click + Create Application. Pick the
Single-Page Applicationoption and go to Settings. Note the Client ID and Domain. - Add the
callback URLin both Allowed Callback URLs and Allowed Origins (CORS). Make it your Unbounce page URL. For example:http://unbouncepages.com/changeit. - Go to Dashboard > Authentication > Social and enable the social providers you want to support.
Unbounce Configuration
- Create a new UI element, like a button, that will trigger the login with the provider. Note the UI element’s ID under Properties > Element Metadata.
- Add a new JavaScript to your Unbounce landing page, select
Before Body End TagunderPlacementand add this code. Also make sure to check jQuery as a dependency.
-
Creating a Form and add
Hidden fieldsfor each field. For example: thenameandemailfields. - Return to the JavaScript editor at Unbounce.
-
Add a click handler for each button to trigger the social authentication.
- Replace the button ID you took note of previously and the connection name. For example, for Google you would use
google-oauth2and for LinkedIn,linkedin. - Make sure that you replace the IDs properly. Instead of
#nameand#emailyou should put the ID of the form fields in question (you can see them while editing the form, underField Name and ID).
- Replace the button ID you took note of previously and the connection name. For example, for Google you would use
Leads section of your Unbounce Admin Panel, after the user submits the form.