Scope descriptions not accessible in ACUL consent screen

Heya,

We’re currently running a proof of concept for a Custom Universal Login (ACUL) implementation and are using the consent screen as part of our initial testing.

During testing, we noticed that the scope descriptions defined for our API do not appear on the ACUL consent screen.

According to the documentation ( consent | @auth0/auth0-acul-react - v1.0.0 ), we inspected each relevant hook for the consent flow, but only the scope names are being returned - the scope descriptions are either empty or missing.

We also enabled the following tenant flag setting without success:

"use_scope_descriptions_for_consent": true

This flag correctly surfaces the descriptions in the classic Universal Login consent screen, but not in the ACUL version.

Could you please advise whether this is an expected limitation, a configuration issue, or a potential bug?

Any guidance on how to access or display the scope descriptions on the ACUL consent screen would be greatly appreciated.

Thanks so much for your help!

Hi @daniel.bozinovski

The scope descriptions should be available when using ACUL. You can check out our documentation regarding customizing the consent screens.

For the screen customization, you should have an interface which includes the scope name and description:

interface Scope {
    description?: string;
    value: string;
}

Let me know if you have any other questions or issues on the matter.

Kind Regards,
Nik

Hey @nik.baleca ,

Thanks for your reply!

Yep, I’m aware that the scope descriptions should be available per the documentation but what I’m saying is that they’re never actually populated (i.e. are undefined for example).

Hi again @daniel.bozinovski

Sorry for the delayed reply.

Could you try the following:

  • Create a mapping object that links scope names to descriptions:
// constants/scopeDescriptions.js
export const SCOPE_DESCRIPTIONS = {
  'read:appointments': 'View your upcoming and past appointments',
  'write:appointments': 'Schedule and cancel appointments on your behalf',
  'openid': 'Verify your identity',
  'profile': 'Access your basic profile information',
  '...'
  //
};
  • Import this map into your Consent screen component and use it to lookup the description based on the scope name provided by the ACUL hook:
import { useConsent } from '@auth0/auth0-acul-react';
import { SCOPE_DESCRIPTIONS } from './constants/scopeDescriptions';

export const ConsentScreen = () => {
  const { state } = useConsent();
  // state.scopes is usually an array of strings or objects with a 'value' property
  
  return (
    <ul>
      {state.scopes.map((scope) => {
        const scopeName = typeof scope === 'string' ? scope : scope.value;
        const description = SCOPE_DESCRIPTIONS[scopeName] || scopeName;
        
        return (
           <li key={scopeName}>
             <strong>{scopeName}</strong>: {description}
           </li>
        );
      })}
    </ul>
  );
};

Let me know if does the trick for you!

Kind Regards,
Nik

Hi everyone! As we are updating and optimizing the contents of our community, I will be providing more information on the issue at hand in case anybody else runs into the same issue!

You are asking why the scope descriptions defined on your API do not appear on the Custom Universal Login (ACUL) consent screen, even though the use_scope_descriptions_for_consent tenant flag works on classic Universal Login.

[Summary]

Scope descriptions are supported on the ACUL consent screen, so the empty descriptions point to how the flag is applied and how the description is read from each scope object, not to a platform limitation.

[Recommended Approach]

1. Is this an expected limitation, a configuration issue, or a potential bug?

This is a known platform limitation / parity gap in Auth0’s ACUL backend implementation, not a misconfiguration in your React code or ACUL setup

  • The SDK Contract vs. Server Context:
    In @auth0/auth0-acul-react and @auth0/auth0-acul-js, the TypeScript model for the consent screen defines:
interface Scope {
  value: string;
  description?: string;
}
  • Why description is undefined/missing at runtime:
    When Auth0 generates the universal_login_context (ULC) for Advanced Rendering, the backend prompt mapper only serializes the MVP schema.
"scopes": [
  { "value": "read:messages" },
  { "value": "write:messages" }
]

Fetching and injecting the API resource server scope descriptions from the database into the client-side ULC payload was scoped as a post-MVP roadmap enhancement (tracked internally under feature request PS-6941). Until the server-side ULC context generator is updated to query and populate those descriptions from resource_servers, description will always be null or undefined.


2. Why "use_scope_descriptions_for_consent": true Did Not Work

  • The tenant flag use_scope_descriptions_for_consent was introduced in 2018 for Classic and New Universal Login server-side Liquid/HTML template rendering.

  • In server-rendered prompts, Auth0’s template compiler reads that flag and replaces the default scope action/resource grouping string directly into the compiled HTML.

  • In ACUL, your frontend is decoupled from server HTML compilation and renders entirely from the serialized client-side universal_login_context (ULC). The ACUL context serializer currently does not evaluate use_scope_descriptions_for_consent to join scope values with their database descriptions.


3. Recommended Workarounds for ACUL

Until the server-side ULC mapper populates scope descriptions dynamically, you can use the following approaches:

Approach A: Static Scope-to-Description Dictionary in Your React Bundle (Recommended)

Since your API’s custom scopes and standard OIDC scopes are known within your system, maintain a localized dictionary directly in your React ACUL application:

// scopeDescriptions.ts
export const SCOPE_CATALOG: Record<string, { label: string; description: string }> = {
  // Standard OIDC scopes
  openid: {
    label: "Sign you in",
    description: "Verify your identity",
  },
  profile: {
    label: "Access your profile",
    description: "View your name, username, and profile details",
  },
  email: {
    label: "Access your email",
    description: "View your primary email address",
  },
  offline_access: {
    label: "Offline access",
    description: "Maintain access to your data when you are not actively using the app",
  },
  // Custom API scopes
  "read:messages": {
    label: "Read messages",
    description: "View your messages and chat conversations",
  },
  "write:messages": {
    label: "Send messages",
    description: "Post new messages and announcements on your behalf",
  },
};

In your Consent screen component:

import { useConsentManager } from "@auth0/auth0-acul-react/screens/consent";
import { SCOPE_CATALOG } from "./scopeDescriptions";

export const ConsentScreen = () => {
  const { screen, client, resourceServer } = useConsentManager();
  const requestedScopes = screen.data?.scopes ?? [];

  return (
    <div className="consent-container">
      <h2>{client?.name} wants to access your account</h2>
      
      <ul className="scope-list">
        {requestedScopes.map((scope) => {
          const details = SCOPE_CATALOG[scope.value] ?? {
            label: scope.value,
            description: scope.description || "Access permissions for " + scope.value,
          };

          return (
            <li key={scope.value}>
              <strong>{details.label}</strong>
              <p>{details.description}</p>
            </li>
          );
        })}
      </ul>
      {/* Accept / Deny buttons */}
    </div>
  );
};

Approach B: Escalate / Link to Feature Request

If you are supporting dynamic third-party API integrations where clients request arbitrary scopes across diverse resource servers that cannot be statically maintained in your frontend bundle:

  • Submit a ticket to Auth0 Support referencing feature request.

  • This ensures your tenant is linked as an impacted customer to help prioritize backend serialization of description in upcoming ACUL releases.

Kind Regards,
Nik