Shamim Hossain
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
Hi 👋 I am using lucia + custom auth. Convex auth is using authjs under the hood probably.
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
@v shared a minimal approach which is I think what you need. But if you need something a little bit more organized, perhaps you can look into this as well. Just keep in mind that this still in active development 🙂 https://github.com/shamscorner/tutpick/tree/feat/auth
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
Sure, would do that.
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
I've managed to complete the authentication flow 🎉 Feel free to look at the last commit on the feat/auth branch.
Now my next tasks are:
- add error handling on the send login link server mutation
- handle error page, example login link expired one
- add session attributes
- finish google auth
- add 2fa
- add user role
- add team & user invitations
- add authorizations.
Want to make a scalable, production ready starter template in the future. 🤞
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
Sure would try your suggested way. Please have some sleep 😊
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
Hi @v , I have made some progress by following your implementation. I have pushed the code in
feat/auth
branch on my repo. Feel free to check that out. You can see the latest couple of commits for the changes that I have been made. However, I am getting a new error xd.
I don't know if you have time for this or not. But to reproduce, follow the steps:
- go to homepage & click login
- send a login link to your email or you can find that on the terminal
- open that link
- You would go to dashboard (if not, just visit manually)
- check out the error log on the convex logs
Btw, I temporarily comment the delete token call. Just to test that flow multiple times. When that is fixed, I would uncomment.135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
It's completely fine! I wasn't sure the flow either so who knows I would probably adopt your way to the implementation xd.
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
Thanks for this one. Let me mimic what you did and I would implement on my repo like that. But I have slight a different approach. I do want to handle the login in this route https://github.com/vynxc/tutpick/blob/feat/auth/src/routes/(onboarding)/auth/email-sign-in/%5Btoken%5D/%2Bserver.ts
I would notify here whenver I am finished with this one.
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
😄 me too sometimes.
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
Awesome 🙂
I have office today. But after the office, I would try my way too. Great job btw! You managed to figure out quite a long way.
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
I think here maybe something like this:
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
I would research on here. That would be an improvement for sure.
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
It would be nice to have because the relations with ents are much easier.
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
I have one question here on your repo. Can we use singleton pattern instead of initiating lucia instance each time we make an auth related call?
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
@v Thanks for all the information 😊 I really appreciate it. I would look into the repo that you sent and would go forward from there. I would love to have a PR but if you are busy enough, I think I can take care.
Btw, the repo hasn't finished yet. After successful login, I have to work on the hooks.server.ts and the layout way that you mentioned but of course mostly ssr.
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
Anything that works for you. But mostly GMT+6
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
I am using sveltekit. I don't know why the error is showing in react context.
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
Here is the repo in case you are wondering https://github.com/shamscorner/tutpick
I just want to send a email magic link that I am going to validate later.
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
I didn't get much time to figure it. But still some things I don't get it. For example, I am using sveltekit but got react specific error, all the dates are converted to appropriate types but still gettting that issue. I even converted the expire_at to string but still getting the same issue.
135 replies
CCConvex Community
•Created by siingers on 8/15/2024 in #support-community
sveltekit & authentication
@v I've tried to implement by following your setup on the lucia adapter but I am stuck on this error. I don't know have you faced this similar error before? I noticed that all the session expire_at values are converted to number but still it is yelling at the type mismatch issue. By the way, I've copy pasted your lucia.ts fiile and everything related to it.
135 replies