How To Setup Oauth2 Authentication With Google: Global Support
How To Setup Oauth2 Authentication With Google: Global Support
The Product Name needs to be supplied the first time you create credentials (and only that time):
Select Web Application and populate the Name, Authorized JavaScript origins and Authorized
redirect URLs:
Click Create and you will be given a ClientID and Secret, which you should store in a safe place (e.g.
KeePass password manager), for reference later:
The name of the service must match the service name chosen earlier (Prerequisites) exactly. The
display name can be chosen freely.
The frames highlighted in red above hold constant values for Oauth2 Google authentication. They must
be populated exactly as shown in the picture above for any Google service:
– Oauth2 server URL without path: https://accounts.google.com
– Path for authorization: /o/oauth2/auth
– Path to get access token: /o/oauth2/token
– Scope for Oauth2 requests: https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
– URL for requesting user data: https://www.googleapis.com/oauth2/v1/userinfo
– Redirect path for Oauth2 server: /auth/oauth2/MyOauth2/loginCallback
The information in blue (Oauth2 client ID and Oauth2 client secret) corresponds to the client ID
shown and to the password defined in the Client ID for web application section on the Google service
site, on the page that shows the client ID.
Note
We recommend you use an external identity service such as LDAP or oAuth2 for all users, including
special users that support web service calls. Nevertheless, you will need to adapt your web service
clients to authenticate with oAuth2
If you are using web services published by Sage X3, you can temporarily activate both basic and oauth2
in your nodelocal.js file and configure the special web service users to use basic authentication. This will
allow you to keep your web services in operation while you adapt them for oauth2. Once you have
upgraded your web service clients you should edit nodelocal.js again and only enable oauth2 to tighten
security.
A direct link can also be typed and/or set in your browser favorites to access Google authentication directly:
http://www.my_server.com/auth/oauth2/MyOauth2/loginStart
When this is done, you are redirected to the Google site to authenticate using your Google account if this
has not already been done. The page appears as follows:
You will be prompted by Google to allow Sage X3 to access the email address for that profile when logging
in for the first time:
Note: Your authentication will be valid until you log out of your Google account or clear your browser’s
cookies As a result Sage X3 may not need to prompt you to authenticate if your Google login is still valid.