ABSmith4/AlpenGlow

View on GitHub
src/middleware/verifyAuth.js

Summary

Maintainability
A
1 hr
Test Coverage

Function verifyToken has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const verifyToken = (req, res, next) => {
  const token = req.header('Authorization');
  if (!token) {
    return res.status(401).json({
      error: 'Authorization token not provided, access denied',
Severity: Minor
Found in src/middleware/verifyAuth.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

      return false;
    Severity: Major
    Found in src/middleware/verifyAuth.js - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status