diff options
-rw-r--r-- | hooks/tryAuthenticate.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hooks/tryAuthenticate.ts b/hooks/tryAuthenticate.ts index 71306ba..aa97648 100644 --- a/hooks/tryAuthenticate.ts +++ b/hooks/tryAuthenticate.ts @@ -3,7 +3,8 @@ import { authenticate } from '@feathersjs/authentication'; export default async (context: HookContext): Promise<HookContext> => { - if (context.params?.headers?.authorization && context.path !== 'authentication') { + const authorization = context.params?.headers?.authorization; + if (authorization && authorization !== 'null' && context.path !== 'authentication') { return authenticate('jwt')(context); } return context; |