I’d like to create a hook to add extra claim information for a client. If I create a hook, can I assign it to one client, or API? Or does it execute on every client?
Hooks are still in Beta and at the moment only apply to [Database Connections] (Database Connections). They will apply to all clients, but you do have access to context.connection
, so you might be able to filter by the connection.
If you want to add information to a tokens from a given client, you can use [rules] (https://manage.auth0.com/#/rules) with context.clientName
such as:
if (context.clientName === 'NameOfTheClient') {
(...)
}
It sure would be nice to allow per client hooks.
Thanks a lot for providing that feedback!