Skip to content

Commit c4352a7

Browse files
committedDec 3, 2022
chore(dev): upgrade dev app and deps
Conflicts: apps/dev/pages/api/auth/[...nextauth].ts
1 parent 7e91d7d commit c4352a7

File tree

4 files changed

+73
-104
lines changed

4 files changed

+73
-104
lines changed
 

‎apps/dev/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
"@prisma/client": "^3",
2222
"@supabase/supabase-js": "^2.0.5",
2323
"faunadb": "^4",
24-
"jsonwebtoken": "^8.5.1",
25-
"next": "13.0.2",
24+
"next": "13.0.6",
2625
"next-auth": "workspace:*",
2726
"nodemailer": "^6",
2827
"react": "^18",

‎apps/dev/pages/api/auth/[...nextauth].ts

+1-20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import NextAuth from "next-auth"
2-
import type { NextAuthOptions } from "next-auth"
3-
import jwt from "jsonwebtoken"
1+
import NextAuth, { type NextAuthOptions } from "next-auth"
42

53
// Providers
64
import Apple from "next-auth/providers/apple"
@@ -70,23 +68,6 @@ import WorkOS from "next-auth/providers/workos"
7068

7169
export const authOptions: NextAuthOptions = {
7270
// adapter,
73-
callbacks: {
74-
async session({ session, user }) {
75-
// NOTE: this is needed when using Supabase with RLS. Otherwise this callback can be removed.
76-
const signingSecret = process.env.SUPABASE_JWT_SECRET
77-
if (signingSecret) {
78-
const payload = {
79-
aud: "authenticated",
80-
exp: Math.floor(new Date(session.expires).getTime() / 1000),
81-
sub: user.id,
82-
email: user.email,
83-
role: "authenticated",
84-
}
85-
session.supabaseAccessToken = jwt.sign(payload, signingSecret)
86-
}
87-
return session
88-
},
89-
},
9071
debug: process.env.NODE_ENV !== "production",
9172
theme: {
9273
logo: "https://next-auth.js.org/img/logo/logo-sm.png",

‎packages/next-auth/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"jest-environment-jsdom": "^28.1.1",
121121
"jest-watch-typeahead": "^1.1.0",
122122
"msw": "^0.42.3",
123-
"next": "13.0.2",
123+
"next": "13.0.6",
124124
"postcss": "^8.4.14",
125125
"postcss-cli": "^9.1.0",
126126
"postcss-nested": "^5.0.6",

‎pnpm-lock.yaml

+70-81
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.