Skip to content

Commit

Permalink
chore(deps): update authjs
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge committed Jan 16, 2024
1 parent 4a97c8b commit e554218
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 31 deletions.
2 changes: 1 addition & 1 deletion apps/auth-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@auth/core": "^0.19.0"
"@auth/core": "^0.20.0"
},
"devDependencies": {
"@acme/eslint-config": "workspace:^0.2.0",
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,10 @@
"turbo": "^1.11.3",
"typescript": "^5.3.3"
},
"prettier": "@acme/prettier-config"
"prettier": "@acme/prettier-config",
"pnpm": {
"overrides": {
"@auth/core": "0.20.0"
}
}
}
18 changes: 11 additions & 7 deletions packages/auth/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ export const {
adapter: DrizzleAdapter(db, tableCreator),
providers: [Discord],
callbacks: {
session: ({ session, user }) => ({
...session,
user: {
...session.user,
id: user.id,
},
}),
session: (opts) => {
if (!("user" in opts)) throw "unreachable with session strategy";

return {
...opts.session,
user: {
...opts.session.user,
id: opts.user.id,
},
};
},
},
});
31 changes: 9 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e554218

Please sign in to comment.