Add a Single Page Application (SPA) App
What is an app?
An app represents your application where users logs in.
This explains how to add SPA app, used by frameworks such as React and Vue.
note
For other app types, see application.
Adding an app
- Console
- Curl
- In Admin console, navigate to Integration โ Marketplace.
- Choose Single Page Application (SPA).
- Click on Add Integration.
- Follow wizard steps.
curl -X POST \
-H "Authorization: Bearer <API_TOKEN>" \
-d '
{
"type":"singlePageApp",
"data":[
{
"type":"appManifest",
"collectorId":"appDetails",
"vars":{
"appId":"myspa",
"displayName":"My SPA",
"active":true,
"appLogic":"local",
"types":[
"scimGroup",
"userLink"
]
}
},
{
"type":"info",
"collectorId":"overview",
"vars":{
}
},
{
"type":"default",
"collectorId":"oauth2Client",
"vars":{
"grant_types":[
"authorization_code"
],
"response_types":[
"code"
],
"scope":"openid offline profile email",
"token_endpoint_auth_method":"none",
"allow_refresh_token":false,
"redirect_uris":[
"https://localhost/callback"
],
"post_logout_redirect_uris":[
"https://localhost/callback"
],
"allowed_cors_origins":[
"https://localhost*"
]
}
}
]
}
' https://{tenant}.crossid.io/api/v1/integrations/.provision/?reason=sample-app
Crossid will give you back client id to be embedded into your app's code.
Update your app
Every time a user tries to login, the app should redirect to Crossid and provide the client id.