Docs

Get Management API Tokens for Single-Page Applications

OIDC-conformant Resource Owner Password Credentials exchange

Adoption Guide

This document is part of the adoption guide for OIDC-conformant authentication. If you haven't already, we strongly suggest reading the introduction before reading this document.

The Resource Owner Password Credentials exchange is used by highly-trusted applications to provide active authentication. Unlike the authorization code and implicit grants, this authentication mechanism does not redirect users to Auth0. It authenticates users with a single request, exchanging their password credentials for a token.

This document describes the differences of this flow between the legacy and OIDC-conformant authentication pipelines.

Limitations

Authentication request

Available scopes and endpoints

Authentication response

  • The returned Access Token is only valid for calling the /userinfo endpoint.
  • A Refresh Token will be returned only if a device parameter was passed and the offline_access scope was requested.
  • The returned Access Token is valid for calling the /userinfo endpoint (provided that the API specified by the audience param uses RS256 as signing algorithm) and optionally the resource server specified by the audience parameter.
  • The ID Token will be forcibly signed using RS256 if requested by a public application.
  • A Refresh Token will be returned only if the offline_access scope was granted.

Using a Management API Token to call the Management API from a SPA

ID Token structure

  • The ID Token will be forcibly signed using RS256 if requested by a public application.
  • The favorite_color claim must be namespaced and added through a rule.

1. Retrieve a Management API Token

Access Token structure (optional)

  • The returned Access Token is a JWT valid for calling the /userinfo endpoint (provided that the API specified by the audience param uses RS256 as signing algorithm) as well as the resource server specified by the audience parameter.
  • Note that an opaque Access Token could still be returned if /userinfo is the only specified audience.

Response

Standard password grant requests

The Auth0 password realm grant is not defined by standard OIDC, but it is suggested as an alternative to the legacy resource owner endpoint because it supports the Auth0-specific realm parameter. The standard OIDC grant is also supported when using OIDC authentication.

2. Call the Auth0 Management API

Further reading