From 6b04525bf529baca8d2fa2d591f3162bd4d88d4f Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 5 Jul 2020 14:22:02 +0300 Subject: hotfix: registration issue --- hooks/tryAuthenticate.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 => { - 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; -- cgit v1.2.3