How to get SPA Client ID in Node.js backend

Hi guys, I have scenario where I have multiple SPA’s that all connect to a single Node.js/Fastify API.

I’ve configured Auth0 in a way where each SPA has it’s own Auth0 application and DB.

Everything is working well including login but the one thing I can’t figure out is how to get the Client ID in Node.js of the SPA used when a user logs in. I can get user information using req.user but is there anyway to determine SPA information?

As an example:

  1. h^^ps:// Client ID = xyz
  2. h^^ps:// - Client ID = abc
  3. h^^ps:// - Client ID = efg

If a user were to login using site 2, how can I get the value of ‘abc’ in my Node.js API?

I need this to determine which data to show to the user.

Apologies, I’ve just figured it out after looking closely.

req.user has a key named azp which contains the Client ID.