-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Feat/mobile auth #772
Feat/mobile auth #772
Conversation
@hkirat Will be testing this thoroughly, and then mark it ready for review. We're disabling auth on local, so need to modify some code to test properly |
src/lib/middleware-utils.ts
Outdated
if (token) { | ||
try { | ||
const payload: any = await verifyJWT(token); | ||
request.nextUrl.searchParams.set('userId', payload.id); |
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.
why can't be this used in logout?
@@ -3,26 +3,22 @@ import db from '@/db'; | |||
|
|||
export async function POST(request: NextRequest) { | |||
try { | |||
// TODO: Get userid from somewhere not body |
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.
lets wait for this to be solved
@nimit9 any update on this? would like to close and merge |
PR Fixes:
middleware.ts
to authorize mobile routesResolves #761
Checklist before requesting a review