Login with SSO in Vahana Application

I have a APP_1 and want to login into APP_2 using SSO how we can do that?

4 Likes
  1. First of all enable SSO in vConnect.
    image

  2. Create GENERATE_SSO_TOKEN in vConnect below is curl:

curl --location 'https://<YOUR_VRT_IP>/router/engine/v1/gatewayProcessor' \
--header 'requestid: <RANDOM_UNIQUE_NUMBER>' \
--header 'orgid: <APP_1_ORG_ID>' \
--header 'appid: <APP_1_APP_ID>' \
--header 'servicename: GENERATE_SSO_TOKEN' \
--header 'clientsecret: <VCONNECT_CLIENT_SECRET>' \
--header 'Content-Type: application/json' \
--header 'loginid: <LOGIN_USER_ID>' \
--data '{
    "orgId": "<APP_2_ORG_ID>",
    "appId": "<APP_2_APP_ID>",
    "loginId": "<LOGIN_USER_ID>"
}'
  1. In the success response of above you will get a ssoToken.
  2. Append this ssoToken and loginId in your APP_2 dashboard url:
https://your-app-url/dashboard/sso_token=<ssoToken>&loginId=<LOGIN_USER_ID>
  1. APP_2 application will check if sso_token key available in url query params then:
Add auth_schem:SSO in AUTH Service Header

AUTH Request Body:
{
ssoToken: <sso_token>,
loginId: <loginId>
} 


6 Likes