If you have several websites, then you have to set up authorization separately for each site.
- Sign up for a Google account.
- Open https://console.cloud.google.com/cloud-resource-manager.
- Create a new project using CREATE PROJECT button.
- Enter any project name and click on CREATE.
- Open the created project’s settings.
- Open section the Explore and enable APIs section.
- Open the OAuth consent screen section.
- Select “User Type → External” and click on CREATE.
- On step “1. OAuth consent screen” enter an app name that will be visible to website visitors when they will sign in via Google and an email address for them to contact you with sign-in related questions.
- Scroll down to the bottom of the page and add your website’s domain name to “Authorized domains” field.
In the “Developer contact information” section enter an email address for Google to notify you about any changes in this project.
- Click on SAVE AND CONTINUE.
- On steps “2. Scopes” and “3. Test users” click on SAVE AND CONTINUE.
- Open the Credentials section.
- Click on Create credentials and select OAuth client ID.
- Select app type Web application.
In the “Authorized redirect URIs” field enter a URL of the form https://mydomain.com/oauth.php?provider=google. Replace mydomain.com with your website’s domain name.
Click on CREATE.
- Copy the displayed Your Client ID and Your Client Secret values.
- Log into your Webasyst backend and open the Site app.
- In the website list, select the one for which you need to set up authorization via Google.
- Open the Personal section.
- Of the authorization is not enable for the selected website, enable it.
In the Ways of login and registration section enable Social networks (additional authorization option).
- Enable the Google option.
- Paste the copied Client ID and Client secret values into the provided fields.
- Save authorization settings using the button at the page bottom.
- Check how the authorization works:
- Open your website in a “private” browser window or tab. Or use another browser where you are not logged in your Webasyst backend or in Google.
- Click on Log in.
- Click the Google icon.
- Type your Google authorization credentials.
- Upon data submission, the page will reload to show authorized user’s personal account on your website.
Done! You have set up authorization via Google on your website.
No comments yet.