Using Social Login

Social Login



Use Facebook, Google or GitHub authentication to login to Frappe, and your users will be spared from remembering another password.

The system uses the Email Address supplied by these services to match with an existing user in Frappe. If no such user is found, a new user is created of the default type Website User, if Signup is not disabled in Website Settings. Any System Manager can later change the user type from Website User to System User, so that the user can access the Desktop.


To enable these signups, you need to have Client ID and Client Secret from these authentication services for your Frappe site. The Client ID and Client Secret are to be set in Desktop > Integration > Authentication > Social Login Key > Client ID and Desktop > Integration > Authentication > Social Login Key > Client Secret. Here are the steps to obtain these credentials.

Use https://{{ yoursite }} if your site is HTTPS enabled.

Facebook


Go to https://developers.facebook.com
Click on Apps (topbar) > New App, fill in the form.
Go to Settings > Basic, set the Contact Email and save the changes.
Go to Settings > Basic>> Display Name(Name of your choice)>> Enter "Privacy Policy URL">> Enter "Terms of Service URL">> Select Category>> Select purpose(Business or client)>> Scroll down to bottom>> Enter website URL>> Click "Save"
Scroll at the top>> Click on the slider button adjacent to "In Development">> Click "Switch Mode">> Save the changes
Go to Status & Review and switch on "Do you want to make this app and all its live features available to the general public?"
Go to Dashboard, click on the show button besides App Secret, and copy the App ID and App Secret into Integration > Authentication > Social Login Key > Client ID and Integration > Authentication > Social Login Key > Client Secret

Google


Go to https://console.developers.google.com
Create a new Project and fill in the form.
Click on APIs & Auth > Credentials > Create new Client ID
Fill the form with:
Web Application
Authorized JavaScript origins as http://{{ yoursite }}
Authorized redirect URI as http://{{ yoursite }}/api/method/frappe.www.login.login_via_google
Go to the section Client ID for web application and copy the Client ID and Client Secret into Integration > Authentication > Social Login Key > Client ID

GitHub


Go to https://github.com/settings/applications
Click on Register new application
Fill the form with:
Homepage URL as http://{{ yoursite }}
Authorization callback URL as http://{{ yoursite }}/api/method/frappe.www.login.login_via_github
Click on Register application.
Copy the generated Client ID and Client Secret into Website > Setup > Social Login Keys and Integration > Authentication > Social Login Key > Client Secret

Updated on: 21/03/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!