login_url
should point to a route in the application that ends up redirecting to Auth0’s /authorize
endpoint, e.g. https://mycompany.org/login
. Note that it requires https
and it cannot point to localhost
. login_url
can include query parameters and a URI fragment.
As per the OIDC Third Party Initiated Login specification, the iss
parameter containing Issuer Identifier will be added as a query string parameter to login_url
before redirecting.
https://{yourDomain}/authorize
with a set of required parameters. Auth0 then redirects end-users to an https://{yourDomain}/login
page, with a URL that looks like:
https://{yourDomain}/login?state=g6Fo2SBjNTRyanlVa3ZqeHN4d1htTnh&...
The state
parameter points to a record in an internal database where we track the status of the authorization transaction. Whenever the transaction completes, or after a set time passes, the record is deleted from the internal database.
If you are using Organizations and the end-user bookmarks the organization login prompt, Auth0 also includes the organization
parameter when it redirects the user to the default login route.
Sometimes users bookmark the login page, and when they navigate to the bookmarked /login
URL, the transaction record is no longer there and Auth0 cannot continue with the login flow. In that case, Auth0 will redirect to the default client URL if configured, or the tenant level URL if not. If no default login URL is set, Auth0 will render an error page.
/post-password-change
endpoint supports redirecting users back to a specific application. When client_id
is specified and the application’s login URI is set, users will see a button sending them back to the application after completing a password reset.
https://myapp.com/login
, then the link sent in the email invitation that an end-user receives will be: https://myapp.com/login?invitation={invitation_ticket_id}&organization={organization_id}&organization_name={organization_name}
.
Thus, the route in your application must accept invitation
and organization
parameters through the query string. To start the invitation acceptance transaction, it should forward both parameters along with the end-user to your Auth0 /authorize
endpoint.
https://{yourDomain}/authorize
with cookies disabled in their browser, Auth0 redirects the user to the application login URI. If the application login URI is not set, the redirect is sent to the tenant login URI instead.
Sending the user back to the login page can potentially cause a redirect loop. To avoid this issue, use a landing page to check the availability of cookies; if disabled, warn the user to enable them if they wish to continue.