Passport Login
Before using the passport Login api, you need to create a developer application on the platform you want to integrate with, for example facebook, google, etc.
Add the clientId and api Key of your application on the service config of your SOAJS tenant application. Also, you will need to add a callback Url for the passport to redirect to within your website.
General Information
Service | API | Method |
---|---|---|
urac | /passport/login/:strategy | GET |
Workflow: Passport Login Flow
Input
Type: application/json
Name | Source | Mandatory | Type | Special Format | Description |
---|---|---|---|---|---|
strategy | Route Param | YES | String | N/A | Only one of these is allowed: "Azure" | "Facebook" | "Google" | "Twitter" | "Github" |
uracConfig | servicesConfig | YES | Object | N/A | This entity is set from the service configuration per extKey per tenant per environment |
Output
Valid Response
Valid Response Sample
{ "result": true, "data": "..." }
Invalid Response
Error Response Sample
{ "result":false, "errors":{ "codes":[399], "details":[ { "code":399, "message":"Missing Service config. Contact system Admin" } ] } }
Error Codes
Code | Description |
---|---|
399 | Missing Service config. Contact system Admin |
Example (CURL)
Request
Calling Login API
> CURL -X GET http://127.0.0.1:4000/urac/passport/login/facebook
Response
Login API response
{ "result": true, "data": { }, "soajsauth": "Basic c29hanM6QzAxNkh5YXdPclhESVkxeU1makJyYV85OHdza2k5bWVDRTY=" }