How to Set up OAuth Authentication
By default, OAuth login support is disabled. To enable it for Google or Facebook credentials, use the appropriate procedure below.
- Register Oxygen Feedback Enterprise with Google:
- To use Google’s OAuth 2.0 authentication system for login, you must set up a project in the Google API Console to obtain OAuth 2.0 credentials.
- Follow the instructions on the OpenID Connect page, starting in the
section, "Setting up OAuth 2.0".
Step Result: You should have a new OAuth Client with credentials consisting of a Client ID and a Client Secret.
- Configure the Oxygen Feedback Enterprise server to point to your newly registered
application by adding the
oauth.google.client.clientId
andoauth.google.client.clientSecret
properties in the config/feedback-oauth.properties file:#### GOOGLE #### oauth.google.client.clientId=google-client-id oauth.google.client.clientSecret=google-client-secret
Note: You need to substitute your client ID and client secret for the placeholder text shown in the example above.
- Set the redirect URI. In the Set a redirect URI sub-section,
ensure that the Authorized redirect URIs field is set to
https://<your-app-base-url>/login/google
.The OAuth redirect URI is the path in the application that the end-user is redirected back to after they have authenticated with Google and have granted access to the application on the OAuth consent screen page.
- Register Oxygen Feedback Enterprise with Facebook:
- Configure your application’s client ID and client secret (you can obtain them by registering your application with Facebook at https://developers.facebook.com/).
- Add the
oauth.facebook.client.clientId
andoauth.facebook.client.clientSecret
properties in the config/feedback-oauth.properties file:#### FACEBOOK #### oauth.facebook.client.clientId=facebook-client-id oauth.facebook.client.clientSecret=facebook-client-secret
Note: You need to substitute your client ID and client secret for the placeholder text shown in the example above.
- Set the redirect URI:
- In the App Dashboard, choose your app and scroll to Add a Product.
- Click Set Up in the Facebook Login card.
- Select Settings in the left side navigation panel and under Client OAuth Settings, enter your redirect URL in the Valid OAuth Redirect URIs field for successful authorization.
- Set the Valid OAuth Redirect URIs field to
https://<your-app-base-url>/login/facebook
.
Custom OAuth Identity Provider
To add Log in support for a custom OAuth Identity
Provider, you need to configure the associated properties
(oauth.generic.*
) in the
config/feedback-oauth.properties file as follows:
- Enable the custom OAuth provider by setting the
oauth.generic.enabled
property to true. - Set a display name for the custom OAuth provider's associated button
from the Log in page using the
oauth.generic.name
property. For example:oauth.generic.name=My Identity Provider
- Register Oxygen Feedback Enterprise as a client
application with your custom OAuth Provider:
- Obtain the OAuth2 credentials
that consist of a Client ID and a Client Secret and set them
as values for the
oauth.generic.client.clientId
andoauth.generic.client.clientSecret
properties (respectively):oauth.generic.client.clientId=generic-client-id oauth.generic.client.clientSecret=generic-client-secret
Note: You need to substitute your Client ID and Client Secret for the placeholder text shown in the example above. - Set the Redirect URI. In the
Oxygen Feedback Client Configuration section of your OAuth
provider, ensure that
https://<your-app-base-url>/login/oauth
is set as Authorized Redirect URI.Note: The OAuth Redirect URI is the path in the application that the end-user is redirected back to after they have authenticated with the custom OAuth Identity Provider and have granted access to the application on the OAuth consent screen page.
- Obtain the OAuth2 credentials
that consist of a Client ID and a Client Secret and set them
as values for the
- Configure the user Authorization Endpoint URI by
setting the
oauth.generic.client.userAuthorizationUri
property according to your Identity Provider (refer to their user manual).Note: The Authorization URI is the URI that the user is to be redirected to for Oxygen Feedback Enterpriseto be granted authorization. - Configure the Access Token Endpoint URI by setting the
oauth.generic.client.accessTokenUri
property according to your Identity Provider (refer to their user manual).Note: This is the endpoint that Oxygen Feedback Enterprise uses to request an access token from the custom Identity Provider. - Configure the User Info Endpoint URI by setting the
oauth.generic.userInfo.uri
property according to your Identity Provider (refer to their user manual).Note:This is the endpoint that Oxygen Feedback Enterprise uses to request information about the authenticated end user. The response should be returned as a set of claims in JSON format.
Oxygen Feedback Enterprise extracts the following informations from the user info response:- Email address - The name of the claim that contains
the user's email address can be customized by setting the
oauth.generic.userInfo.claims.email
property. If not set, this property defaults to: email.Important: If Oxygen Feedback Enterprise cannot retrieve an email address for the authenticated user, the authentication process will fail. - User ID - The name of the claim that contains the
user's ID can be customized by setting the
oauth.generic.userInfo.claims.id
property. If not set, this property defaults to: id. - User name - The name of the claim that contains the
user's name can be customized by setting the
oauth.generic.userInfo.claims.name
property. If not set, this property defaults to: name.
- Email address - The name of the claim that contains
the user's email address can be customized by setting the
############################### KEYCLOAK ####################### ### Custom OAuth Provider (other than Google or Facebook) ### oauth.generic.enabled=true # The OAuth Provider's name (used as label for the associated 'Log in' button) oauth.generic.name=Keycloak oauth.generic.client.clientId={oxygen-feedback-client-id} oauth.generic.client.clientSecret={oxygen-feedback-client-secret} oauth.generic.client.accessTokenUri={keycloak-server-base-url}/auth/realms/{keycloak-realm}/protocol/openid-connect/token oauth.generic.client.userAuthorizationUri={keycloak-server-base-url}/auth/realms/{keycloak-realm}/protocol/openid-connect/auth oauth.generic.client.scope=email # User Info Properties # The URI of the OAuth Provider's '/userinfo' endpoint oauth.generic.userInfo.uri={keycloak-server-base-url}/auth/realms/{keycloak-realm}/protocol/openid-connect/userinfo # The names of the claims in the JSON returned by the OAuth Provider's '/userinfo' endpoint oauth.generic.userInfo.claims.id=sub oauth.generic.userInfo.claims.name=name # Mandatory - if an email address could not be obtained for the current user then the authentication process will fail oauth.generic.userInfo.claims.email=email
You need to replace all placeholders ({xxx-xxx}
) with
their appropriate values. For more details about how to configure a client application on a
Keycloak server, see https://www.keycloak.org/docs/latest/server_admin/index.html#oidc-clients.
############################### OKTA ############################ ### Custom OAuth Provider (other than Google or Facebook) ### oauth.generic.enabled=true # The OAuth Provider's name (used as label for the associated 'Log in' button) oauth.generic.name=Okta oauth.generic.client.clientId={oxygen-feedback-client-id} oauth.generic.client.clientSecret={oxygen-feedback-client-secret} oauth.generic.client.accessTokenUri={okta-base-url}/oauth2/v1/token oauth.generic.client.userAuthorizationUri={okta-base-url}/oauth2/v1/authorize oauth.generic.client.scope=openid profile email # User Info Properties # The URI of the OAuth Provider's '/userinfo' endpoint oauth.generic.userInfo.uri={okta-base-url}/oauth2/v1/userinfo # The names of the claims in the JSON returned by the OAuth Provider's '/userinfo' endpoint oauth.generic.userInfo.claims.id=sub oauth.generic.userInfo.claims.name=name # Mandatory - if an email address could not be obtained for the current user then the authentication process will fail oauth.generic.userInfo.claims.email=email
You need to replace all placeholders ({xxx-xxx}
) with
their appropriate values. For more details about how to configure a client application to
Okta, see https://developer.okta.com/docs/guides/implement-auth-code/setup-app/.
############################### GitLab ############################ ### Custom OAuth Provider (other than Google or Facebook) ### oauth.generic.enabled=true # The OAuth Provider's name (used as label for the associated 'Log in' button) oauth.generic.name=Gitlab oauth.generic.client.clientId={oxygen-feedback-client-id} oauth.generic.client.clientSecret={oxygen-feedback-client-secret} oauth.generic.client.accessTokenUri={gitlab-base-url}/oauth/token oauth.generic.client.userAuthorizationUri={gitlab-base-url}/oauth/authorize oauth.generic.client.scope=openid # User Info Properties # The URI of the OAuth Provider's '/userinfo' endpoint oauth.generic.userInfo.uri={gitlab-base-url}/oauth/userinfo # The names of the claims in the JSON returned by the OAuth Provider's '/userinfo' endpoint oauth.generic.userInfo.claims.id=sub oauth.generic.userInfo.claims.name=name # Mandatory - if an email address could not be obtained for the current user then the authentication process will fail oauth.generic.userInfo.claims.email=email
{xxx-xxx}
) with
their appropriate values. For more details about how to configure a client application to
GitLab, see https://docs.gitlab.com/ee/integration/oauth_provider.html.