aboutsummaryrefslogtreecommitdiff
path: root/src/server/authentication
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-12-03 14:02:12 -0500
committerBob Zeleznik <zzzman@gmail.com>2019-12-03 14:02:12 -0500
commit9a0787aafb623ce0aa043419533b51378f56e070 (patch)
tree782f17ac0761673500cf20ffb42959d3e1fe0687 /src/server/authentication
parent0961e03a6ba250fa8aa813d763975c5d25082349 (diff)
fixes to rich text embedded notes & focus behavior. fixes to compile errors in passport/routemanager/Initiatlization
Diffstat (limited to 'src/server/authentication')
-rw-r--r--src/server/authentication/config/passport.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/authentication/config/passport.ts b/src/server/authentication/config/passport.ts
index 2271109a5..0ced99b0d 100644
--- a/src/server/authentication/config/passport.ts
+++ b/src/server/authentication/config/passport.ts
@@ -40,7 +40,7 @@ export let isAuthenticated = (req: Request, res: Response, next: NextFunction) =
export let isAuthorized = (req: Request, res: Response, next: NextFunction) => {
const provider = req.path.split("/").slice(-1)[0];
- if (_.find(req.user?.tokens, { kind: provider })) {
+ if (_.find(req.user && "tokens" in req.user ? req.user["tokens"] : undefined, { kind: provider })) {
next();
} else {
res.redirect(`/auth/${provider}`);