Requirements by scenario
Each resource server that your Portal calls, the My Account API and the My Organization API, needs two things:
- A client grant, which allows the application to request the scopes.
- A refresh token policy, which allows the portal server to exchange the for an access token for that resource server.
My Account API scopes
My Account API scopes
Audience:
https://YOUR_DOMAIN/me/read:me:factorsread:me:authentication_methodscreate:me:authentication_methodsdelete:me:authentication_methods
My Organization API scopes
My Organization API scopes
Audience:
https://YOUR_DOMAIN/my-org/read:my_org:detailsupdate:my_org:detailsread:my_org:configurationread:my_org:domainscreate:my_org:domainsupdate:my_org:domainsdelete:my_org:domainsread:my_org:identity_providerscreate:my_org:identity_providers_domainsdelete:my_org:identity_providers_domains
Recommended configuration
Use these settings for the portal application. The refresh token lifetimes match the portal session: 1 hour of inactivity and 1 day in total. Grant only the scopes for the components that your Portal uses, and remove the policy and the grant for a resource server that your Portal does not call.- Auth0 Dashboard
- Management API
1
Create the application
Navigate to Auth0 Dashboard > Integration > Applications, select Create Application, choose Regular Web Applications, and enter a name.
2
Set the URLs
In the Settings tab, set Allowed Callback URLs to
https://YOUR_DOMAIN/portals/auth/callback. Set Allowed Logout URLs to the URL of your application, which is where users land after they log out of the Portal.3
Trust the token endpoint IP header
In the Credentials tab, under Advanced, enable Trust token endpoint IP header.
4
Set the grant types
In Advanced Settings > Grant Types, enable Authorization Code, Refresh Token, and MFA. Leave all other grant types off.
5
Set the refresh token lifetimes
In Refresh Token Expiration, enable Set Idle Refresh Token Lifetime and enter 3600 seconds. Enable Set Maximum Refresh Token Lifetime and enter 86400 seconds. Leave refresh token rotation off, which is the default.
6
Allow organizations
In the Organizations tab, set Type of Users to Both and Login Flow to No Prompt.
7
Grant API access
In the API Access tab, authorize the My Account API and the My Organization API for user access, with the scopes from Requirements by scenario.
8
Enable multi-resource refresh tokens
In Multi-Resource Refresh Token, enable the same APIs and scopes. Select Save Changes.
Settings you must not change
These settings change how Portals work and should not be changed.- Do not enable DPoP. The portal server is a confidential client and does not use sender-constrained tokens.
- Do not enable refresh token rotation. Portals do not support it.
- Do not share an application between Portals. Each Portal needs its own application.
- Do not set the refresh token inactivity lifetime below 1 hour. The portal session lasts 1 hour of inactivity. A shorter refresh token lifetime makes API calls fail before the Portal asks the user to sign in again.
- Do not add grant types or scopes that the Portal does not use. For example, do not enable the
client_credentialsgrant. - Do not add a Management API grant to the portal application. Forms that update users should use a separate machine-to-machine application.
Scenario settings
Some use cases need extra settings on the portal application. Review the scenarios in this section and apply the settings that match how your users open the Portal.Native application
To open the Portal from a native application, the portal application must accept session transfer tokens that arrive in the URL. Add this to the portal application:Organization context
To open the Portal with theorganization parameter, the portal application must allow Organizations:
no_prompt login flow. With them, always send organization when you open a business Portal. To learn more, read Define Organization Behavior and Access Portals.
Forms that update users
A form whose Flow updates users calls the Management API through a Forms vault connection. Create a separate machine-to-machine application for that connection and grant it only the scopes that the Flow needs, such asupdate:users and update:users_app_metadata. To learn more, read Auth0 Vault Connections.
Link the application to the Portal
- Auth0 Dashboard
- Management API
- Navigate to Auth0 Dashboard > Portals and select Create Portal, or open an existing Portal.
- Enter a Name and a Slug, and select the application. The slug becomes part of the portal URL.
- Select Create.
Validate enabled connections
Users can sign in to the Portal with any connection that is enabled for the portal application. Before you share the Portal, make sure that at least one connection your users need is enabled.- Navigate to Auth0 Dashboard > Applications and select the portal application.
- Select the Connections tab.
- Turn on the connections your users need. If no connection is enabled, users cannot sign in to the Portal.
If the Enable Application Connections tenant setting is on, the portal application gets all of the tenant’s current connections, including the one the Quickstart creates. To learn more, read Tenant Settings.
Verify the configuration
Openhttps://YOUR_DOMAIN/portals/{slug} and sign in with a test user. Open a page with a Universal Component. If the component shows an error, read Troubleshoot Universal Portals.
Next steps
Troubleshoot Universal Portals
Fix API errors, sign-in problems, and organization problems.
Access Portals
Send users from your applications to the Portal.