External Authentication allows you to integrate with select social media platforms, and allow users to log in or create an account using e.g. their Google, Twitter or Facebook accounts.
Before you can use external authentication, you must create an app or similar on the social media platform. Here are some external guides:
When you create these apps you will be provided with a number of parameters – typically an ID and a Secret – which you must use to relate and authorize your Dynamicweb account to the account on the social media of your choice.
On callback URLs
If the configuration of your social media app requires "callback urls", you should use "http://your.website.com/signin-facebook", "http://your.website.com/signin-google" or "http://your.website.com/signin-twitter"
When you have created your social media app, you can configure an external authentication provider in Dynamicweb:
- Go to Settings > Control Panel > External Authentication and click Add
- Configure the provider (Figure 3.1)
- Name the provider
- Decide if it should be active or not
- Check Enable for backend if relevant (not available on all providers)
- Select a login provider
Each login provider requires you to provide the secret and the key/ID from the social media app you created.
In addition, you can configure the behavior for creating new users based on the social media account (Figure 3.2).
You have the following options:
- The Create new user page field lets you redirect users with no account to a page with an Extranet app, where they can then create a user. They will be placed in the user group configured on the Extranet app. You can use the URL parameter CreateUserPageID instead of this field, which will then be ignored.
- The Create local account without showing the "Create new user" page auto-creates a user based on the social media account details, places the user in the group(s) selected, and redirects them to the page they were trying to access before being prompted to login
In frontend, you can then loop through all the external providers you have configured and render an appropriate control for calling ExternalLogin.aspx with the ProviderID:
|Field name||Data type||Length|