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

Expo authentication using next-auth #486

Open
rahmat-dev opened this issue Aug 10, 2023 · 5 comments · Fixed by #832 · May be fixed by #720
Open

Expo authentication using next-auth #486

rahmat-dev opened this issue Aug 10, 2023 · 5 comments · Fixed by #832 · May be fixed by #720

Comments

@rahmat-dev
Copy link

Can I use the existing next-auth configuration to handle authentication for the expo app? I don't wanna use any service like clerk, supabase, etc.

@philsmithies
Copy link

right now it is just with external services it seems

@BRDSLY
Copy link

BRDSLY commented Aug 12, 2023

I believe we're still waiting on authjs/next. Keep an eye on these PRs.

nextauthjs/next-auth#5240
#133

@HarunKilic
Copy link

Is there any workaround except external services?

@BRDSLY
Copy link

BRDSLY commented Sep 15, 2023

@HarunKilic In one of my projects I did a little bit of funkiness but not sure on the security etc. Can't remember exactly how I did it but something along the following:

  • Used expo oauth to get all details of google login, send token and other details to a custom mobile login endpoint
  • Generate unique device ID stored in expo securestore
  • check the provided token using google api (This is good enough for me to allow them access), make real account if not an existing user
  • Manually created a new session I think, and a new mobile session object that contains that session, unique device ID that will be bound to that session and provided on every call I think?
  • added to the default nextauth prisma adapter to do session logic, think I maybe added some middleware in to facilitate there being now 2 auth objects

Haven't touched this project in a while, can't remember it well, but have a play around with your next auth adapter which will be a drizzle one now I think? haven't used t3 in a while so things will probably have changed.

@SnzDev
Copy link

SnzDev commented Mar 4, 2024

on PR#720 how to use with credentials?

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