- App.ts options add app.options("*", cors()); - Change routes everywhere to have [cors(), checkJwt]. cors() must be first, checkJwt must be second - Send token as object instead of string in authController - Set token to longer expiration (24 hours) - User controller have to return JSON not string: For example: "message": "username already in use"
App.ts options add app.options("*", cors());
Change routes everywhere to have [cors(), checkJwt]. cors() must be first, checkJwt must be second
Send token as object instead of string in authController
Set token to longer expiration (24 hours)
User controller have to return JSON not string:
For example: "message": "username already in use"