Google authentication in Wise Chat Pro
Wise Chat Pro users can use their own Google accounts to log in to the chat. Thus, there is no need for a separate account in your website. A regular Google account is enough to get authenticated.
From the user’s perspective Google authentication is very simple. User clicks Google login button in Wise Chat Pro and then is redirected to Google site where he/she logs in to Google normally. Wise Chat Pro gains permission to use Google account for authentication purpose. After this, the user is redirected back to Wise Chat Pro page and immediately becomes authenticated.
When user logs in via Google the following data is transferred to Wise Chat Pro:
- user name
- profile URL
- avatar image URL
Before you configure Google authentication
- Disable Anonymous Users
- Force Username Selection
How to set Google authenticationTo enable Google authentication in Wise Chat Pro you will need Client ID and Client Secret. In order to get these two values you have to:
1. Log in to https://console.developers.google.com using your regular Google account.
2. At the top left corner click menu icon, then
IAM & adminand
4. Enter the name of your project and click
5. Wait a minute and refresh prjects list. You should be able to see your newly created project there. Click on the project’s name
6. At the top left corner click menu icon, then
API & servicesand
OAuth consent screentab, fill Product name shown to users field and click
8. In the
Credentialstab, select the
Create credentialsdrop-down list and choose
OAuth client ID.
9. Under Application type, select Web application. Fill Name field and add
Authorized redirect URI. Be careful to put a correct URI in Authorized redirect URI field. It has to be the exact direct URL to the page where you have installed Wise Chat Pro on your website. Additionally attach “?wcExternalLogin=go” text to the end of the URL. For example:
10. From the resulting OAuth client dialog box copy the
11. Log in to your WordPress website as an administrator. Go to
Wise Chat Pro Settingspage and click External login tab. Scroll down to see the following form:
Fill Client ID and Client Secret fields with values that you have copied in the previous step of this tutorial. After you save the form Google authentication is complete.