Skip to content

Custom OAuth API usage

Aditya Bhardwaj edited this page May 11, 2021 · 1 revision

Custom OAuth API usage

Post Request Endpoint: <RC_INSTANCE_URL>/api/v1/settings.addCustomOAuthWithSettings

JSON Request to be used:

  • name - Mandatory

Optional fields in request

  • enabled - true/false
  • serverURL - OAuth server URL
  • tokenPath - Relative token path to server URL
  • tokenSentVia - payload or header
  • identityPath - Relative identity path to server URL
  • authorizePath - Relative authorise path to server URL
  • scope - Scope for OAuth
  • clientId - Unique client ID for OAuth
  • clientSecret - Client secret

Customisation fields

  • accessTokenParam
  • loginStyle
  • buttonLabelText
  • buttonLabelColor
  • buttonColor
  • keyField
  • usernameField
  • emailField
  • nameField
  • avatarField
  • rolesClaim
  • groupsClaim
  • channelsAdmin
  • mapChannels - Boolean
  • mergeUsers - Boolean
  • showButton - Boolean

Sample Request

`{

"name":"cognito",

"serverURL": <SERVER_URL>,

"tokenPath":"/oauth2/token",

"identityPath":"/oauth2/userInfo",

"authorizePath":"/oauth2/authorize",

"clientId":<CLIENT_ID>,

"clientSecret":<CLIENT_SECRET>,

"enabled":true

}`

Clone this wiki locally