Sending Custom Headers or Query Parameters on Server-Side Requests

Overview

Using Next.js, calls are made to Auth0 applications that are server-side (ex: POST https://TENANT.com/oauth/token)). This article will explain whether or not it is possible to add custom headers or query parameters on server-side requests.

Applies To

  • Next.js
  • Server-side requests
  • Custom parameters

Solution

Please see the below:

  • Custom headers: They are ignored.
  • Custom query parameters: They are ignored for the /token endpoint. They can be used on /authorize and then incorporated into New Universal Login templates if you include ext- prefix. They are available in post-Login event.request.query for calls to /authorize.
  • Custom body parameters: They are available in post-Login and M2M event.request.body in Actions.