You can build your own UIs next to the Quasr UIs, e.g. to match your design completely, to use your own domain, or to make login and account management part of your application. Your UIs use the same public APIs as ours, so they can do everything ours do.
It's not one or the other: your UIs and ours can be used side by side, in the same tenant. This is most common for login, as each application has its own Login URI. For example, your customer-facing applications use your own login UI, branded as part of your product, while your internal tools and the Admin UI keep using our Login UI in internal mode for your team. Likewise, your customers can manage their account in your application while our Account UI stays available.
You can also replace a UI of ours completely, so it's no longer used: see Disabling on the tab of the Login UI, Account UI and Admin UI.
| Next to or instead of | With | Authorization |
|---|---|---|
| Login UI | Your own login page on the Authentication API, set as Login URI of your applications | None, then the session token |
| Account UI | Your own account page (or part of your application) on the Management API | Access token with the Account Access scope |
| Admin UI | Your own admin tool on the Management API, or automation with the Management API or Agent API | Access token with the Admin Access scope |
With your own login UI your applications still connect with standard OpenID Connect, exactly as with ours (see Applications — Browser): only the login page in the middle of the flow is yours. It signs users up and logs them in with the Authentication API, and sends them back to Quasr with a consent token once they're done.
Quasr redirects the user to the Login URI of the application with all parameters of the authorization request. Keep the full query string: you need it unchanged in step 5. The parameters your login UI uses:
client_id - The application the user is logging in to. Get its name with GET https://{tenant_id}.api.quasr.io/accounts/{client_id} (client_name) rather than trusting the client_label parameter, which anyone can change in a link.scope - The scopes the application requests (space-separated), which decide the consents you ask in step 4.prompt, mode and ui_locales - Optional, see Login UI — Parameters for how our Login UI handles them.error and error_id - Set when Quasr sends the user back after something went wrong, e.g. at an identity provider.Load what the user can choose from, without authorization at the start and with the session token later on:
GET https://{tenant_id}.api.quasr.io/factors - The factors to sign up or log in with, and once a session exists, the remaining enrollments or factors of the user (see Factors — Authentication API). For the first factor of a login, offer the unique factors that identify the account, e.g. email or username.GET https://{tenant_id}.api.quasr.io/controls?client_id={client_id} - The controls of the application: the legal controls to accept, the scope and claim controls to consent to, and the score each requires (see Controls).GET https://{tenant_id}.api.quasr.io/attributes - The attributes the application needs, if you also want to ask users for personal data (see Attributes — Capture).Pass the factors one at a time with POST https://{tenant_id}.api.quasr.io/factors, as explained in Factors — Authentication API and on the page of each factor:
POST https://{tenant_id}.api.quasr.io/controls?client_id={client_id} to accept the legal controls, which returns a signup session token. Invited users use their invite token as session token instead.Continue until the score of the session (session_score) reaches the score of the controls the application requires.
Ask for the consents the application still needs, and optionally for missing personal data with POST https://{tenant_id}.api.quasr.io/attributes. Then pass the controls with the user's choices to POST https://{tenant_id}.api.quasr.io/controls?client_id={client_id}, with the session token. Once all required controls are passed, the response contains a consent token.
Redirect the user to the authorization endpoint with the original query string from step 1 and the consent token:
GET https://{tenant_id}.api.quasr.io/oauth2/authorize?{original_authorization_request}&consent={consent_token} HTTP/1.1Quasr checks the consent token and returns to the application, which receives its tokens as usual (see Tokens — Consent).
Set your login page as the Login URI of each application that should use it, in the Admin UI under Applications or with the Management API (config.login_uri, see Applications — Configuration). Applications you don't change keep using our Login UI, so you can move one application at a time, or keep ours for some of them on purpose, e.g. for internal tools.
Then test the whole flow from the application's page in the Admin UI, which starts an authorization request with the options you choose, e.g. prompt and mode:
Beyond the basic flow, consider what our Login UI does for your users:
prompt=login it ignores an existing session, e.g. to switch accounts.internal flag in the response to the first factor (see Login UI — Internal Mode).capture_input and capture_claims as false unless the user agreed, as they default to true in the API (see Login UI — Consent & Data Notes).Your own account page is an ordinary application that logs users in with OpenID Connect and calls the Management API on their behalf, like our Account UI does:
https://api.quasr.io/scopes/account. The control requires a score of 5 by default.openid https://api.quasr.io/scopes/account, through our Login UI or your own, and exchange the code for an access token.getAccount, listEnrollments, createEnrollment, listClaims, updateClaim, listConsents, updateConsent, listTokens and listEvents.An admin tool of your own works the same way, with the Admin Access control (https://api.quasr.io/scopes/admin) instead of Account Access. This control also requires a permission, so only your administrators can use the tool, and a score of 5 by default.