Skip to content

Commit

Permalink
HOTFIX: kick banned accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratstail91 committed Dec 23, 2023
1 parent 59c610b commit 72a4b0e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth-server",
"version": "1.8.0",
"version": "1.8.1",
"description": "An API centric auth server. Uses Sequelize and mariaDB by default.",
"main": "server/server.js",
"scripts": {
Expand Down
11 changes: 6 additions & 5 deletions server/auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ router.post('/signup', require('./signup'));
router.get('/validation', require('./validation'));
router.post('/login', require('./login'));

//refresh token
router.post('/token', require('./token'));

//password recover and reset
router.post('/recover', require('./password-recover'));
router.get('/reset', require('./password-redirect'));
Expand All @@ -23,8 +20,6 @@ router.patch('/reset', require('./password-reset'));
router.delete('/logout', require('./logout'));

//middleware
router.use(tokenAuth);

router.use(async (req, res, next) => {
const record = await accounts.findOne({
where: {
Expand All @@ -43,6 +38,12 @@ router.use(async (req, res, next) => {
next();
});

//refresh token
router.post('/token', require('./token'));

//authenticate token
router.use(tokenAuth);

//basic account management (needs a token)
router.get('/account', require('./account-query'));
router.patch('/account', require('./account-update'));
Expand Down

0 comments on commit 72a4b0e

Please sign in to comment.