How can I get custom parameters to a Token Inline Hook request?

I have a React application that uses Okta as the identity provider with the OKTA redirect flow for users to login.

I have implemented a Token Inline Hook to enrich the access token with additional claims. During the hook execution, my external webhook queries our database to retrieve user-specific information and patches those values into the access token.

I now have a new requirement.

Users can initiate the login flow from different pages within the application, and I need to know which page initiated the login. My idea was to pass a custom parameter (for example, pageId) in the Okta /authorize request. Then, when the Token Inline Hook is invoked, I would read that same pageId value from the inline hook request payload, use it to query additional data from my database, and patch the resulting information into the access token.

For example:

/authorize?...&pageId=abc123

However, after testing this approach, I noticed that although the custom parameter is included in the /authorize request, it does not appear in the Token Inline Hook request payload sent to my webhook.

My questions are:

  1. Is there a supported way to pass custom parameters from the /authorize request to a Token Inline Hook?
  2. Are custom authorization request parameters intentionally omitted from the inline hook payload?
  3. If this is not supported, what would be the recommended approach to provide request-specific context (such as a page ID) to the Token Inline Hook so that I can generate dynamic claims in the access token?

Any guidance or recommended patterns would be greatly appreciated.

Thank you!

I’ve tested this and found it to work, yes.

Check out the following article that walks through the set-up, including what the request payload to the hook endpoint will look like and where to find the request URL: How to Use Okta’s Token Inline Hooks to Add/Modify Claims Based on Parameters Included in an /Authorize Request | Okta Support Center