Skip to content
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

feature: Move auth to be jwt only #761

Closed
hkirat opened this issue Jun 4, 2024 · 3 comments
Closed

feature: Move auth to be jwt only #761

hkirat opened this issue Jun 4, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@hkirat
Copy link
Contributor

hkirat commented Jun 4, 2024

We need to move off of next auth since we want to support react native
This would mean we use a simple cookie based auth for nextjs and jwt based auth for mobile apps.

Whenever the user signs in, we set the cookie on the domain for the browser.

If the user logs in from mobile (/api/signin/mobile) , they get back a JWT that they can send in every future request to authenticate themselves.

@hkirat hkirat added the enhancement New feature or request label Jun 4, 2024
@devsargam
Copy link
Collaborator

wokring on this

@hkirat
Copy link
Contributor Author

hkirat commented Jun 4, 2024

@devsargam we're thinking of keeping next auth
And along with it introducing another endpoint that mobile can hit and get back a jwt

That way we dont have to touch the existing web code, can just expose an extra /signin/mobile endpoint for mobile

At the API route level we should update the middleware to check both next auth/authorization header

@Pritam12F
Copy link
Contributor

Can I work on this? @hkirat @devsargam This looks like a good issue to me.

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

Successfully merging a pull request may close this issue.

3 participants