This is a Hook for Liferay that allows users to Sign in using Google account.
The hook is using Google OAuth 2.0 API.
In order to use this Hook you follow this steps:
-
Create a new Web Application using Google Cloud Console (https://cloud.google.com/console)
-
Select OAuth 2.0 Client ID
-
Add the redirect URI that matches your portal settings. It should contain (/c/portal/google_login?cmd=token). i.e (http://localhost:8080/c/portal/google_login?cmd=token)
-
Click the Download JSON button to obtain the file client_secrets.json.
-
Save the client_secrets.json on your server
-
Define google.client.secrets.location property in portal-ext.properties with the path to your client_secrets.json
Then, you're ready to go. Deploy the hook and enjoy :)