Web Dev Cody
Web Dev Cody9mo ago

support for next-auth ur Lucia auth?

I’m curious if anyone has a good repo or template which sets up a next app using next-auth, Lucia auth, or anything custom that doesn’t use a third party auth service?
23 Replies
Web Dev Cody
Web Dev CodyOP9mo ago
Like a convex next-auth template with google and GitHub social logins
jamwt
jamwt9mo ago
Templates
The backend application platform with everything you need to build your product.
jamwt
jamwt9mo ago
like that one, @Web Dev Cody ^?
Web Dev Cody
Web Dev CodyOP9mo ago
yes, but I don't see social media setup on that; id that easy to add in @Michal Srb ?
Michal Srb
Michal Srb9mo ago
No. I’m working on new built-in auth that will have what you’re asking for. The closest thing is https://github.com/xixixao/convex-auth if you check the github branches. (But what we’re working on will look different and be easier to set up)
GitHub
GitHub - xixixao/convex-auth: Demonstration of authentication purel...
Demonstration of authentication purely via Convex. Contribute to xixixao/convex-auth development by creating an account on GitHub.
yanis
yanis9mo ago
i'm aiming to implement Sign in with Apple JS (https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js) in a SvelteKit project. would the built-in auth you're working on be a helper for me?
Michal Srb
Michal Srb9mo ago
Yes, very likely (although auth support for Svelte might be less polished than for React for some time, as everything takes time to build)
Hosna Qasmei
Hosna Qasmei7mo ago
looking for this as well 🙂 Hey @Michal Srb , do you know if there are any updates on this?
Abhishek
Abhishek7mo ago
@Hosna Qasmei here is with next auth https://stack.convex.dev/nextauth
Convex with Auth.js (NextAuth)
Learn how to use Auth.js with your Next.js server and Convex backend to build a full-featured authentication system.
jamwt
jamwt7mo ago
@Hosna Qasmei we have a pretty major release of our auth coming out in a week or perhaps a little more. we'll announce to everyone when it's ready!
Hosna Qasmei
Hosna Qasmei7mo ago
Awesome, thank you @jamwt
Hosna Qasmei
Hosna Qasmei7mo ago
Hey @Abhishek I followed the template you shared,https://github.com/get-convex/convex-nextauth-template, but when i login i get this error, have you come across it? @Michal Srb did I miss something? Has to do with the User not being authenticated
Michal Srb
Michal Srb7mo ago
@Hosna Qasmei You probably misconfigured some step (maybe one of the JWT-related variables). See https://docs.convex.dev/auth/debug
Debugging Authentication | Convex Developer Hub
You have followed one of our authentication guides but something is not working.
Hosna Qasmei
Hosna Qasmei7mo ago
Ah yes, this was super helpful. Figured it out, I ran
node generateKeys.mjs
node generateKeys.mjs
again, the values changes for JWKS and CONVEX_AUTH_PRIVATE_KEY, so I only updated one and left the other the same. So now after running it and use both it works, figured I was doing that in this section of the docs. Thank you @Michal Srb 🙏
No description
Abhishek
Abhishek7mo ago
@jamwt @Michal Srb quick question with the convex auth can we able to get the refresh token from the oauth providers like linkedin for example?
Michal Srb
Michal Srb7mo ago
@Abhishek can you say more? Why do you need the refresh token from the oauth provider?
Abhishek
Abhishek7mo ago
Sure @Michal Srb so I am building this thing social media scheduler thing and currently I allow my users to login / signup only through social media for example twitter , linkedin etc and after getting signed in I access their refresh token to schedule posts and post through the app Currently, in clerk, I am using this method to get the refresh token: https://clerk.com/docs/references/backend/user/get-user-oauth-access-token#get-user-oauth-access-token
JavaScript Backend SDK: getUserOauthAccessToken()
Use Clerk's Backend SDK to retrieve the corresponding OAuth access token for a user.
Coffee11
Coffee117mo ago
convex-auth the missing piece ❤️
jamwt
jamwt7mo ago
coming very soon! just had a security review yesterday 😉
v
v7mo ago
im excited
thedevstockgirl
thedevstockgirl6mo ago
It would be great to surface these early labs, as I literally spent my last entire two days setting up authjs with hono in convex. Mostly got working. And only ran across https://labs.convex.dev/auth when I ran across James repo using the deprecated @Michal Srb/convex-auth. Now I feel like I could have saved all those hours of exploration if I had just seen this earlier. Some of us like to tinker, so if this was in the works, would have loved to know before all the hours I put in. 😀 I barely use discord, and only ever come here when I have a problem. And convex has been awesome so far, so yay to no discord visits. Either way, love the product. And just came to say, love the email updates, and would have loved to receive some type of preview of this in the email as well.
Convex Auth - Convex Auth
Relations, default values, unique fields and more for Convex
Michal Srb
Michal Srb6mo ago
@thedevstockgirl it's not released yet, and I'm breaking it daily, so it probably wouldn't have saved you time. But we're gearing up to release it very soon ™️
thedevstockgirl
thedevstockgirl6mo ago
Ok. Cool cool. Looking forward to the release 🎉 . Thank you.

Did you find this page helpful?