@exobase/use-jwt-auth
v1.0.0-rc.12
Published
Exobase authentication hook for JWTs
Downloads
15
Readme
Provides an Exobase hook to parse and validate a JWT token in a request. It also includes a utility for generating JWT tokens.
Usage
import { compose } from 'radash'
import type { Props } from '@exobase/core'
import { useJWTAuth } from '@exobase/use-jwt-auth'
const endpoint = (props: Props) => {
console.log(props)
}
export default compose(
useExpress(),
useJWTAuth({
type: 'id',
secret: 'my-little-secret'
}),
endpoint
)