Skip to content

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

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

0marSalah
Copy link
Member

No description provided.

Copy link

vercel bot commented Apr 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dev.linked-claims-author ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2025 10:08pm
linked-claims-author ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2025 10:08pm
linked-claims-author-3teh ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2025 10:08pm
linked-claims-author-73r1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2025 10:08pm
linked-claims-author-8dp5 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2025 10:08pm
linked-claims-author-gpm4 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2025 10:08pm
linked-claims-author-ltir ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2025 10:08pm
linked-claims-author-mobile ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2025 10:08pm
linked-claims-author-t3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2025 10:08pm

// In-memory token store, replace with Redis?
const SESSION_TOKENS = new Map()

const JWT_SECRET = process.env.JWT_SECRET || 'RANDOE_SECRET_KEY'
Copy link
Collaborator

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

Copy link
Member Author

@0marSalah 0marSalah Apr 16, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants