Conversation
|
I've just realised that the Shall we add the |
julianfbeck
left a comment
There was a problem hiding this comment.
Hey, Thanks for your pr! I wanted to use auth with lazy stack and found your open PR :)
i just testet it and needed to adjust a view things to get it working for me :)
| clientId: import.meta.env.GITHUB_CLIENT_ID, | ||
| clientSecret: import.meta.env.GITHUB_CLIENT_SECRET | ||
| }) | ||
| ] |
There was a problem hiding this comment.
| ] | |
| ], | |
| callbacks: { | |
| session({ session, user }) { | |
| if (session.user) { | |
| session.user.id = user.id; | |
| } | |
| return session; | |
| } | |
| } |
This adds the id field to the session.user object. Otherwise you wont retrieve the user id on
| (account) => ({ | ||
| compoundKey: primaryKey(account.provider, account.providerAccountId) | ||
| }) |
There was a problem hiding this comment.
| (account) => ({ | |
| compoundKey: primaryKey(account.provider, account.providerAccountId) | |
| }) | |
| (account) => ({ | |
| compoundKey: primaryKey({ | |
| columns: [account.provider, account.providerAccountId] | |
| }) | |
| }) |
| token: text('token').notNull(), | ||
| expires: integer('expires', { mode: 'timestamp_ms' }).notNull() | ||
| }, | ||
| (vt) => ({ compoundKey: primaryKey(vt.identifier, vt.token) }) |
There was a problem hiding this comment.
| (vt) => ({ compoundKey: primaryKey(vt.identifier, vt.token) }) | |
| (vt) => ({ | |
| compoundKey: primaryKey({ columns: [vt.identifier, vt.token] }) | |
| })``` |
| "@auth/core": "^0.18.6", | ||
| "@auth/drizzle-adapter": "^0.3.12", | ||
| "astro": "^4.0.8", | ||
| "auth-astro": "^4.1.0", |
There was a problem hiding this comment.
| "auth-astro": "^4.1.0", | |
| "auth-astro": "^4.1.1", |
| "@astrojs/node": "^7.0.3", | ||
| "@astrojs/tailwind": "^5.1.0", | ||
| "@auth/core": "^0.18.6", | ||
| "@auth/drizzle-adapter": "^0.3.12", |
There was a problem hiding this comment.
| "@auth/drizzle-adapter": "^0.3.12", | |
| "@auth/drizzle-adapter": "^0.5.0", |
I had to update this adapter
What's been changed?
astro-authintegrationauth.config.ts) with GitHub provider by default + Drizzle database adapter@auth/core@auth/drizzle-adapterauth-astroCommentFormcomponent/loginpage/loginif not logged in.example.envwith template environment variablesdefaultNameprop toCommentFormcomponentenv.d.ts