[ADDON] Social Login and Register
External Authentication / Login / Register using a 3rd party account
Allows your users to connect with one click to your ElkArte Forum using their social network accounts.
Supports several social networks: Twitter, LinkedIn, Google, GitHub, Yahoo, Amazon, Facebook
Introduction
Inspired by https://www.elkarte.net/community/index.php?topic=4360.0 and trying on the challenge. Here is an External Authentication / Login / Register Addon that uses your Social Media account. This addon builds on the initial work done by @Ant59 and at the core it is using HybridAuth
To use this YOU need to register your site as an "app" at EACH Social Network Provider that you intend to allow on your site. Doing this is different but similar for each Site, basic instructions and links are below (and also in the Admin section of the addon) The admin settings for the addon are under Admin -> Members -> Registration -> OAuth Providers
Details
The settings for the addon are under Admin -> Members -> Registration -> OAuth Providers
Each social network will require that you create an external application linking your Web site to their API. These external OAuth applications ensure that users are logging into the correct Web site and allows it to send the user back to the correct Web site after successfully authenticating.
The link to setup your OAuth accounts for these sites is provided in the Admin Panel along with general steps of what to do for each API. Most important will be the Redirect URIs which is provided in the help for each.
Features
- Allows a single ElkArte user profile to be connected to multiple social provider accounts
- Follows Elkarte's registration workflow but streamlined with provider authorization.
- Attempt to fetch some profile information from the social site during registration (avatar, name, website, etc) access depends on each social site.
- Allows users to authorize / deauthorize providers in their account settings (Modify Profile -> Connected Accounts)
- Allows admin to selectively enable / disable providers
- Allows for one button login to connected accounts.
Existing users should "Connect" their current site account with each of the social networks they intend to use. They can do this from their profile page Modify Profile -> Connected Accounts. Once done they can simply click the appropriate social icon on the login page and be logged in to the site.
New users can select a social login icon which will begin a registration process that will Connect a new site account to the chosen social site. They will still have to accept your site agreement and any required profile fields you have enabled including email and userid.
Repo / Download
Get it here: https://addons.elkarte.net/feature/External-Auth.html
Provider Setup
The specifics for providers are always changing. You will need to do your own legwork/homework on what is required for each. HybridAuth should be your source on how to do those steps. The following is just a general guide for several providers. Note the specific steps are often changing so use this as a basic outline to get you going.
Setting up Twitter
Setting up Google
- Go to https://console.cloud.google.com/apis/credentials
- Create a new project, you will then see the API Manager for you new Project
- Select OAuth consent screen. The consent screen will be shown to users whenever you request access to their
private data using your client ID. Fill out any required fields such as the site url, contact email and logo. You also need to enable the email and profile "scopes". - Select Credentials -> Create Credentials -> OAuth Client ID.
- In Client ID settings: Select Application Type as Web Application
- Authorized Redirect URIs - enter the Authentication URL https://YOUR-SITE-URL/sources/ext/hybridauth?hauth.done=Google
- Copy your Client ID and Client secret to corresponding fields in the addon settings
Setting up Yahoo!
Setting up GitHub
Setting up Amazon
Setting up Facebook
Setting up LinkedIn