-
Notifications
You must be signed in to change notification settings - Fork 2
feat: implement QR code API route with session ID generation #344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
app/api/lcw/qr-code/route.ts
Outdated
// In-memory token store, replace with Redis? | ||
const SESSION_TOKENS = new Map() | ||
|
||
const JWT_SECRET = process.env.JWT_SECRET || 'RANDOE_SECRET_KEY' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will get created on each evaluation of this module, which might mean the sessions are not persisted across separate invocations of the route.
It might work better if you move this map instance to another module. then i think all imports of the Map will get the same instance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i will just create a single API route like /api/lcw/[request].ts and handling different types of requests based on the [request] param
No description provided.