Auth0 Home Blog Docs

Are hooks applied to all Clients?

hooks

#1

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?


#2

Hooks are still in Beta and at the moment only apply to [Database Connections] (https://auth0.com/docs/connections/database). 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.clientNamesuch as:

if (context.clientName === 'NameOfTheClient') {
  (...)
}

#3

It sure would be nice to allow per client hooks.