refactor: moves apps outside of apps/ path
This commit is contained in:
parent
b2d1a5ae9e
commit
c85e2e2357
45 changed files with 4 additions and 3 deletions
25
www/auth.config.ts
Normal file
25
www/auth.config.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import GitHub from '@auth/core/providers/github';
|
||||
import { defineConfig } from 'auth-astro';
|
||||
|
||||
export default defineConfig({
|
||||
providers: [
|
||||
GitHub({
|
||||
clientId: import.meta.env.GITHUB_CLIENT_ID,
|
||||
clientSecret: import.meta.env.GITHUB_CLIENT_SECRET,
|
||||
}),
|
||||
],
|
||||
callbacks: {
|
||||
jwt({ token, account, profile }) {
|
||||
if (account && profile) {
|
||||
token.id = profile.id;
|
||||
}
|
||||
return token;
|
||||
},
|
||||
session({ session, token }) {
|
||||
if (session.user && token.id) {
|
||||
(session.user as any).id = String(token.id);
|
||||
}
|
||||
return session;
|
||||
},
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue