# get_auth_handler · FT4 Rell API · Chromia Docs (concept)

> function get_ auth_ handler(op_ name: text): _auth_handler Finds the auth handler for the provided operation name among all the auth handlers
defined in th

Source: https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.auth/get_auth_handler/

FUNCTION

# get\_auth\_handler

```signature
function get_auth_handler(op_name: text): _auth_handler
```

[Source](https://gitlab.com/chromaway/ft4-lib/-/blob/development/rell/src/lib/ft4/core/auth/module.rell#lines-209)

Finds the auth handler for the provided operation name among all the auth handlers
defined in this dapp as extensions of `auth_handler`.

All auth handlers will be in a `map<scope: text, _auth_handler>`

A scope can be:

* an operation name, in the way it is called from the client: `a.b.my_op`
* an operation name prefixed with `OVERRIDE_PREFIX`: `OVERRIDE_PREFIX + "a.b.my_op"`
* a mount point: `a.b`
* the value of `APP_SCOPE`

When calling an operation, the auth handler that will be used is (in this order):

* the auth handler with the operation name as scope, if it exists
* the auth handler with the operation name and `OVERRIDE_PREFIX` as scope, if it exists
* the auth handler with the closest mount point as scope, if it exists
* the auth handler with the app scope, if it exists

For example, an operation mounted on `a.b.my_op` will look for, in this order:

* the auth handler with scope `a.b.my_op`
* the auth handler with scope `OVERRIDE_PREFIX + "a.b.my_op"`
* the auth handler with scope `a.b`
* the auth handler with scope `a`
* the auth handler with the app scope

Throws if `op_name` is not valid

Throws `"MISSING HANDLER"` if no auth handler is defined for this operation, nor any
mount point above it.

**Parameters**

* **op\_name** — the name of the operation

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-rell/-f-t4%20-library/lib.ft4.core.auth/get_auth_handler.html)Generated API reference, mirrored from the live docs
