Skip to content

Commit

Permalink
chore: next-auth upgrade, peer version compatibility for v5 (#1618)
Browse files Browse the repository at this point in the history
* chore: upgrade next-auth to 4.24.5

* fix: add peer warning for next-auth 5 incompatibility

* chore: add error logs to next-auth authorization api

* chore: changeset
  • Loading branch information
DanielSinclair authored Nov 20, 2023
1 parent 2f56ab2 commit 9dfe053
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changeset/sixty-beans-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rainbow-me/rainbowkit-siwe-next-auth": patch
---

Added strict peer incompatibility with `next-auth@5`. RainbowKit will support `next-auth` v5 in a future release with improved App Router support.
2 changes: 1 addition & 1 deletion examples/with-next-siwe-next-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@rainbow-me/rainbowkit-siwe-next-auth": "workspace:*",
"ethers": "^5.6.8",
"next": "^13.4.19",
"next-auth": "4.22.3",
"next-auth": "4.24.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"siwe": "^2.1.4",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"jsdom": "^22.1.0",
"lokijs": "^1.5.12",
"next": "^13.4.19",
"next-auth": "4.22.3",
"next-auth": "4.24.5",
"postcss": "^8.4.29",
"postcss-prefix-selector": "^1.16.0",
"react": "^18.2.0",
Expand All @@ -83,4 +83,4 @@
"esbuild"
]
}
}
}
4 changes: 2 additions & 2 deletions packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@rainbow-me/rainbowkit-siwe-next-auth": "workspace:*",
"ethers": "^5.6.8",
"next": "^13.4.19",
"next-auth": "4.22.3",
"next-auth": "4.24.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"siwe": "^2.1.4",
Expand All @@ -24,4 +24,4 @@
"keywords": [],
"author": "",
"license": "ISC"
}
}
1 change: 1 addition & 0 deletions packages/example/pages/api/auth/[...nextauth].ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export function getAuthOptions(req: IncomingMessage): NextAuthOptions {
id: siwe.address,
};
} catch (e) {
console.error('siwe authorization failed', e);
return null;
}
},
Expand Down
4 changes: 2 additions & 2 deletions packages/rainbowkit-siwe-next-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"license": "MIT",
"peerDependencies": {
"@rainbow-me/rainbowkit": "1.0.x || 1.1.x || 1.2.x",
"next-auth": ">=4.21.0",
"next-auth": ">=4.21.0 <5",
"react": ">=17",
"siwe": "^2.1.4"
},
Expand All @@ -44,4 +44,4 @@
"url": "git+https://github.com/rainbow-me/rainbowkit.git",
"directory": "packages/rainbowkit-siwe-next-auth"
}
}
}
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

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

2 comments on commit 9dfe053

@vercel
Copy link

@vercel vercel bot commented on 9dfe053 Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 9dfe053 Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.