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
Like a convex next-auth template with google and GitHub social logins
Templates
The backend application platform with everything you need to build your product.
like that one, @Web Dev Cody ^?
yes, but I don't see social media setup on that; id that easy to add in @Michal Srb ?
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.
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?
Yes, very likely (although auth support for Svelte might be less polished than for React for some time, as everything takes time to build)
looking for this as well 🙂
Hey @Michal Srb , do you know if there are any updates on this?
@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.
@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!
Awesome, thank you @jamwt
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
@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.
Ah yes, this was super helpful. Figured it out, I ran 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 🙏
@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?
@Abhishek can you say more? Why do you need the refresh token from the oauth provider?
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.
convex-auth the missing piece ❤️
coming very soon!
just had a security review yesterday 😉
im excited
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
@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 ™️
Ok. Cool cool. Looking forward to the release 🎉 . Thank you.