OAuth consent
OAuth consent asks the user to approve the scopes a client requests before LoginRadius issues an authorization code. LoginRadius decides when the consent screen is required, renders it in Auth Studio, stores the user's decision, and issues tokens that carry only the approved scopes.
How consent works
Consent runs after the user signs in and before LoginRadius redirects to the client's redirect_uri. The same screen renders in the standard Auth Studio login flow and in Identity Orchestration (IO) workflows.
When the consent screen appears
The client type and the requested API Resource decide whether the user sees the screen. LoginRadius shows the screen only for scopes the user has not already approved for that client.
| Client | Consent screen shown when |
|---|---|
| Standard OAuth 2.0 or OIDC app | The request names a resource with Enforce consent screen enabled and asks for at least one of its API scopes. A request for OIDC scopes alone does not show the screen. |
| DCR or CIMD client | Always, for every requested scope, including OIDC scopes and requests without a resource. |
Any client with prompt=consent | Always, even when the user has already approved the scopes. |
The consent screen never appears for Auth Studio templates older than version 3.0.2 or for V2 Auth Studio templates. See Resource Indicators for the resource parameter and MCP Auth for DCR and CIMD clients.
Prompt parameter
The OIDC prompt parameter on the /authorize request changes how consent is handled.
prompt | Behavior |
|---|---|
consent | Shows the consent screen for all eligible scopes, ignoring earlier approvals. |
none | Returns consent_required to redirect_uri instead of showing the screen. |
| Not set | Shows the screen only for scopes the user has not approved. |
Prerequisites
Auth Studio renders the consent screen through the LoginRadius V3 JS SDK, so the template serving your login pages must support it. Complete both steps before you enable consent on any API Resource.
- Upgrade the Auth Studio template to SDK version 3.0.2 or later.
- Update
redirectIfAuthenticated()in the template'sbefore-script.jsso a signed-in user on an authorize request stays on the page.
function redirectIfAuthenticated() {
if (
params.has("response_type") ||
commonoptions.federationTokenCallback ||
authorizeFlow ||
params.has("code") ||
params.has("vtoken")
) {
return;
}
// ...existing redirect logic
}
A template older than 3.0.2, including one mapped to a custom domain, skips the consent screen and returns consent_required to the client. A template without the before-script.js change redirects away before the screen renders.
Enable consent for an API
Standard apps show the consent screen only for API Resources that enforce it. DCR and CIMD clients always require consent and need no configuration.
- Navigate to Authorization → APIs and open the API Resource.
- Under User Access, enable Access based on RBAC Roles.
- Enable Enforce consent screen.
- Click Update.
The User Access section appears only when resource-level RBAC is enabled for your Tenant. Contact LoginRadius support to enable it.
Consent screen
The screen lists the requested OIDC scopes as plain-language permissions and groups API scopes under their API Resource. Each API scope shows the description you set on the API Resource, so write descriptions the user can understand.
LoginRadius renders one of two variants based on the client.
| Variant | Used for | Shows |
|---|---|---|
| Standard | Standard OAuth 2.0 and OIDC apps | Tenant logo, app name, scopes, Approve and Deny |
| Dynamic client | DCR and CIMD clients | Tenant logo and client logo, app and client name, scopes, privacy policy and terms of service links, Approve and Deny |
The dynamic client variant reads the client logo, terms of service, and privacy policy from the logo_uri, tos_uri, and policy_uri the client sent at registration. A missing logo shows a placeholder, and a missing link shows as plain text.
OIDC scopes use the default labels below.
| Scope | Default label |
|---|---|
openid | Verify your identity |
profile | Access your profile information |
email | Access your email address |
phone | Access your phone number |
address | Access your address |
To change the screen text or translate it, edit the OAuth Consent and Dynamic Client OAuth Consent components in Auth Studio localization.
Approve and deny
The user's decision completes the authorization request. LoginRadius stores approvals and removes denied scopes from any earlier approval.
| Decision | Result |
|---|---|
| Approve | LoginRadius stores the approval and redirects to redirect_uri with the authorization code. |
| Deny | LoginRadius removes the denied scopes from the stored approval and redirects to redirect_uri with error=access_denied, error_description=user denied consent, and the original state. |
| No decision before the request expires | The consent request is valid for 15 minutes, or for the app's Access Token lifetime if shorter. After it expires, the user signs in again. |
Stored approvals
LoginRadius stores each approval per user and client, so later sign-ins, new sessions, and logouts do not show the screen again. The screen returns when the client requests a scope the user has not approved, when the request uses prompt=consent, or after the user denies or an administrator revokes the approval.
For DCR and CIMD clients, the Access Token scope claim contains only the scopes the user approved. For standard apps, the same narrowing applies when resource-level RBAC is enabled. See Scope Resolution for how scopes are intersected.
View and revoke consent
Administrators can view and revoke approvals granted to DCR and CIMD clients from the Admin Console, either per client or per user. Revoking consent does not invalidate tokens already issued. Existing Access Tokens remain valid until they expire, and the user sees the consent screen on the next authorization request.
By client
By user
- Navigate to Applications and open the app.
- Select the Clients tab and click View Details on the client.
- Under Consented Users, click Revoke Consent for the user.
- Navigate to User Management and click View Profile on the user.
- Under Account Info → Consented Clients, click Revoke Consent for the client.
Errors
The client receives consent errors as standard OAuth 2.0 error parameters on redirect_uri. Handle both in your callback.
error | Cause |
|---|---|
consent_required | The request used prompt=none and consent is required, or the Auth Studio template is older than 3.0.2. |
access_denied | The user clicked Deny. |
Best practices
- Request only the scopes you need: every additional scope appears on the screen and triggers a new prompt.
- Write clear scope descriptions: the user reads them on the consent screen to decide.
- Register client metadata: DCR and CIMD clients that send
logo_uri,tos_uri, andpolicy_urishow a complete consent screen. - Handle consent errors: treat
access_deniedas a user decision andconsent_requiredas a signal to retry withoutprompt=none.