canove / whaticket-community

A very simple Ticket System based on WhatsApp messages, that allow multi-users in same WhatsApp account.
MIT License
1.67k stars 844 forks source link

Error Session expires and access token fails 401 error #571

Open WilliamRueda opened 1 year ago

WilliamRueda commented 1 year ago

Hello, I have a problem, the app works perfectly but if I reload the page it appears that the section expired or after 15 minutes it does the same image image

Re1M0n commented 1 year ago

Same here. would like to add session persistence, but IDK where. Can´t find the file where the login is

Marcmanc commented 1 year ago

I think it is this file, I haven't tested it yet: backend/src/config/auth.ts

secret: process.env.JWT_SECRET || "mysecret", expiresIn: "15m", refreshSecret: process.env.JWT_REFRESH_SECRET || "myanothersecret", refreshExpiresIn: "7d"

antoniosaints commented 1 year ago

Estou com o mesmo erro, na hora de criar uma conexão, conecta no app, mas não atualiza no whaticket e aparece esse console.error

image

antoniosaints commented 1 year ago

Fala pessoal, consegui resolver, segue o passo a passo

pm2 stop all rm -rf backend/dist rm -rf backend/node_modules rm -rf package-lock.json nano package.json

altere essa linha para "whatsapp-web.js": "^1.22.1", para isso "whatsapp-web.js":"1.22.2-alpha.0"

npm i npm run build pm2 start all

e ta resolvido

stale[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.