-
Notifications
You must be signed in to change notification settings - Fork 4
Server - Allow toggle of the DEFAULT user via an ENV variable. #525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
if ALLOW_ANON exists the DEFAULT USER will be used, else reject the connection
Codecov Report
@@ Coverage Diff @@
## master #525 +/- ##
==========================================
- Coverage 27.8% 27.78% -0.02%
==========================================
Files 180 180
Lines 2924 2926 +2
Branches 425 426 +1
==========================================
Hits 813 813
- Misses 1789 1790 +1
- Partials 322 323 +1
Continue to review full report at Codecov.
|
sjmcculloch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
| }, | ||
| })).catch(() => Promise.reject(Error('Unauthorised'))), | ||
| )); | ||
| })).catch(() => false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please explain what this changes functionally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping
| postJWTAuth(!err ? { id: decoded.id, device: decoded.device } : { id: null, device: null }) | ||
| .then(({ user, device }) => ({ user, device })) | ||
| .catch(() => Promise.error('Unauthorised')), | ||
| .catch(() => Promise.reject(Error('Unauthorised')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sneaky fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed that one did you
if ALLOW_ANON exists the DEFAULT USER will be used, else reject the
connection