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
WorkOS - AuthKit
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
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?
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
That would be awesome thanks
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
let me get the url for you
GitHub
GitHub - thatgurkangurk/gurkz.me at solid
my little website. Contribute to thatgurkangurk/gurkz.me development by creating an account on GitHub.
auth config is in src/lib/auth.ts
Awesome thanks 🙏
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
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.
This is a prisma adapter but same logic goes for drizzle
oh alright thanks
if anyone else needs it, its now in the main branch