Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12345678910111213141516171819202122232425262728
  1. 'use strict'
  2. module.exports = options => {
  3. return {
  4. key: options.jwtKey,
  5. verifyOptions: {
  6. algorithms: ['HS256'],
  7. },
  8. validate: (decoded, request, h) => {
  9. console.log('decoded :>>', decoded) // doesn't log to console...
  10. try {
  11. // Check if the Access Token is Valid
  12. // if (!accessTokenIsValid) {
  13. // Look up if the Session is Active
  14. // } else {
  15. // isValid: true
  16. // }
  17. return {
  18. isValid: true,
  19. credentials: { user: artifacts.decoded.payload.user },
  20. }
  21. } catch (err) {
  22. console.error(err)
  23. return { isValid: false }
  24. }
  25. },
  26. }
  27. }