With the Google Plus Login, you can integrate a Google login plugin in your application, easing the login process, and making it unnecessary to create a new account.
Follow the steps below to configure the Google Plus login plugin.
1. Go to the Google API Manager console and log in using your Google credentials.
2. Create a new project.
3. Enter your app's name in the name input.
4. Select and enable the Google + API.
5. Click the Create credentials button.
6. Add credentials to your project. a. Select Google+ API in the kind of credentials you need. b. Select Web server (e.g. node js, Tomcat) as the setting you'll need to configure. c. Choose User data as the data you will be accessing. d. Click the What credentials do I need? button.
7. Add authorized redirect URIs. a. To authorize all the URLs from the server, add “/*” in Authorized redirect URIs. b. To authorize a specific app, add to the URL, the application name and in the end, add “/*” to authorize all application screens.
8. Add the product name that the users will see.
9. Save the Client ID. You will need it during the Android configuration.Click Done.
The following steps are iOS-specific.
1. Go to Enable Google services for your iOS app.
2. Choose the App Name (this should be the same name that you gave to the project), and enter the application identifier (the same as your iOS certificate).
3. Click Enable Google Sign-in.
4. A new iOS key and OAuth 2.0 client ID for iOS appear when you refresh the console page. Copy the schema from iOS - OAuth 2.0 client IDs.
Extensibility Configuration JSON:
"{ "plugin": { "url": "https://github.com/EddyVerbruggen/cordova-plugin-googleplus#5.0.3", "variables": [{ "name": "REVERSED_CLIENT_ID", "value": "{iOS URL scheme}" }] }}"
5. Return to the browser, copy the Client ID from WebClient1. You will need it later.
6. Reference all actions from the GoogleLoginPlugin. Drag the GoogleLogin action to your client side login action.
7. Define the following parameters, only two are mandatory:
8. The GoogleLogin action validates the Google account, however, if you want a system login you should code that. Google Core provides you with an action to do that, and it’s explained above.
9. Reference Google Core actions and drag ValidateAndLoginGoogleUser action after the GoogleLogin action.ValidateAndLoginGoogleUser has the following input parameters:
10. After you call this action, your user is logged in using the OutSystems login, so you can GrantRoles and manage it as you want.
11. The Google Login Plugin is ready. Publish your app.
Can you please give a detailed explanation for the action flow ? I followed the steps as shown above but still the google login fails... I also have doubt with the values given to the mandatory fields of the "Google Login" and "Validate and Login Google User".. I would like a detailed description about both the actions.
With Thanks,
A.Ebina Sony