auth0 poppy doctor to verify that they match.
Prerequisites
- A tenant with the Personal Agent Protocol (Poppy) beta enabled.
- An existing API with an
httpsidentifier and a description for every scope. - An existing first-party Regular Web Application for your website.
- A Management API access token with
update:tenant_settings,update:resource_servers,update:clients,create:clients,create:client_grants, andcreate:agents.
Configure tenant settings
authorization_response_iss_parameter_supported, resource_parameter_profile, and default_audience apply to every application in your tenant. With a default audience, applications that send no audience receive tokens for your API.- Auth0 Dashboard
- Management API
- Navigate to Dashboard > Settings > General. Under API Authorization Settings, set Default Audience to your API’s identifier, and select Save.
- Navigate to Dashboard > Settings > Advanced.
- Under Personal Agent Company Domains, add each of your company domains. To remove a domain, remove it from the list.
- Turn on Client ID Metadata Document support, Issuer (
iss) in authorization responses, and the Resource Parameter Compatibility Profile. - Select Save.
Configure your API
- Auth0 Dashboard
- Management API
- Navigate to Dashboard > Applications > APIs and select your API.
- On the Settings tab, turn on Available to Personal Agents.
- Under Access Token Settings, turn on Include agent subject claims.
- Under Access Settings, turn on Allow Skipping User Consent and Allow Offline Access.
- Select Save.
- Select the Permissions tab. Make sure every scope has a description, and add
poppy:browser-sign-inwith the description “Use the website on your behalf, with the permissions you approve”.
poppy:browser-sign-in that way instead, such as “Use the website on your behalf, with full access to your account”, and set web.unscoped in poppy.json. Auth0 doesn’t enforce this setting: your website does.
Allow guest access tokens (optional)
After a signed-out browser join, your web application receives an access token for your API only if the API allows anonymous users for that application. Skip this if your web application calls only public endpoints for guests.- Auth0 Dashboard
- Management API
- Navigate to Dashboard > Applications > APIs and select your API.
- On the Settings tab, under Application Access Policy, set Anonymous Access to per-app authorization.
- Select Save.
Configure your web app
- Auth0 Dashboard
- Management API
- Navigate to Dashboard > Applications > Applications and select your web application.
- On the Settings tab, turn on Allow Personal Agent Browser Join.
- In the URLs tab, set Application Login URI to your application’s login route, and make sure Allowed Callback URLs includes your callback route.
- Select Save Changes.
Your browser join endpoint is
https://YOUR_AUTH0_DOMAIN/poppy/WEB_APP_CLIENT_ID/browser-session. Use your custom domain if you have one.Allow guest access tokens for your web app (optional)
If you set the API’s Anonymous Access to per-app authorization, grant your web application the scopes guests may use.- Auth0 Dashboard
- Management API
- Navigate to Dashboard > Applications > Applications and select your web application.
- Select the API Access tab, find your API, and select Edit.
- Under Anonymous Access, select the scopes guests may use.
- Select Save.
Skip MFA during joins
A join can’t show prompts, so it fails if MFA or any other prompt would run. If you require MFA, skip it when an actor is present in a post-login Action. To learn more, read Customize MFA Selection.Add the refresh token Action
Agents that follow the protocol may not requestoffline_access. Add a post-login Action that requests it for agents that sign in to your API, and bind it as the last Action of the post-login flow:
- Auth0 Dashboard
- Management API
- Navigate to Dashboard > Actions > Library and select Create Action > Build from scratch.
- Enter a name, such as
Poppy refresh tokens, select the Login / Post Login trigger, and select Create. - Paste the code above, set
POPPY_APISto your Poppy API identifiers, and select Deploy. - Navigate to Dashboard > Actions > Triggers and select post-login.
- In the Custom tab, drag the Action to the end of the flow and select Apply.
Register agents
For each personal agent you allow:- Manually create its application from its CIMD URL. In Dashboard > Applications > Applications, select Create Application > Import from URL, enter the agent’s URL, select Preview, and then Create. To use the Management API, read Register Applications with CIMD.
- Link it to an agent. Create an agent with the application’s
client_id. To learn more, read Register an Agent. Without a link, the web application’s tokens name the agent by its CIMD URL. - Grant it scopes on your API: Create a client grant that authorizes the agent’s application to get access tokens for your API on behalf of signed-in users for a specific set of scopes you define.
- Auth0 Dashboard
- Management API
- Navigate to Dashboard > Applications > Applications and select the agent’s application.
- Select the APIs tab and find your API.
- Turn on access for your API and select the scopes the agent may request, including
poppy:browser-sign-in. - Select Update.
token_endpoint_auth_signing_alg, Auth0 stores only the keys of that algorithm; when it omits it, Auth0 stores every key. When an agent rotates its keys, select Refresh Client Metadata on its application.
To block an agent, delete its application, which revokes its refresh tokens. Already issued access tokens stay valid until they expire.
Serve the discovery files
Serve both files on your company domain, at the root, over HTTPS. The Auth0 web SDKs serve them for you./.well-known/oauth-protected-resource:
/.well-known/poppy.json: