S
SolidJS2w ago
sh03

OAuth / OpenID Connect

What’s the simplest way you guys have found to implement a sign in with Google / Instagram / Apple in SolidJS?
14 Replies
hyperknot
hyperknot2w ago
WorkOS - AuthKit
Atila
Atila2w ago
MediaKit Auth is great I'm publishing a video this week about that, meanwhile there's the docs: https://mediakit-taupe.vercel.app/auth/install
MediaKit
Install | MediaKit
Installing MediaKit
sh03
sh03OP2w ago
Nice. It’s a little bit unclear where I can hook my database for creating / verifying users. Should I look at Auth.js docs for that?
Gurkan
Gurkan2w ago
yes, the database part is identical I have it set up on my website with drizzle , I can send you the GitHub repo if you want to use as an example
sh03
sh03OP2w ago
That would be awesome thanks
OrJDev
OrJDev2w ago
Basically authjs is just the wrapper, you can specify any db adapter you want, it supports prisma, supbase, drizzle, etc You can also easily write custom adapter if you need
Gurkan
Gurkan2w ago
let me get the url for you
Gurkan
Gurkan2w ago
GitHub
GitHub - thatgurkangurk/gurkz.me at solid
my little website. Contribute to thatgurkangurk/gurkz.me development by creating an account on GitHub.
Gurkan
Gurkan2w ago
auth config is in src/lib/auth.ts
sh03
sh03OP2w ago
Awesome thanks 🙏
OrJDev
OrJDev2w ago
I have a fix for you const dbUser = await db.query.users.findFirst({ where: (table, { eq }) => eq(table.id, user.id), columns: { permissions: true, role: true, }, }); When session is called, it already fetched the user from the db, so doing it again you basically call it twice What i recommend, is writing a custom adapter modifying the drizzle one
OrJDev
OrJDev2w ago
GitHub
hackchat/src/server/adapter.ts at main · OrJDev/hackchat
Realtime Chat App Built With Solid. Contribute to OrJDev/hackchat development by creating an account on GitHub.
OrJDev
OrJDev2w ago
This is a prisma adapter but same logic goes for drizzle
Gurkan
Gurkan6d ago
oh alright thanks if anyone else needs it, its now in the main branch
Want results from more Discord servers?
Add your server