nestjs module for authenticating typegraphql with keycloak
Please ★ this repo if you found it useful ★ ★ ★
npm install --save nestjs-keycloak-typegraphql
@Owned(responsePath, keycloakTokenPath)
if keycloak keycloakAttribute not provided, then it checks the user id.
examples
@Owned() // checking userId on response
@Owned('post.email', 'email')
@Owned('hello', 'attribute.world')
Must use AuthGuard instead of AuthChecker because getHandler() and getClass() from the context (under context.typegraphqlMetadata) is not available to the auth checker. The reason it is available to the AuthGuard is because the middleware for the guard is deferred.
Submit an issue
Silicon Hills LLC © 2021
- Clay Risser - Author