Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for Next.js 15 and React 19 #26

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ updates:
directory: "/"
schedule:
interval: weekly
groups:
dev-dependencies:
dependency-type: "development"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ To start:
2. Change directory to `/examples`
3. Execute `docker compose up`. A CAS server for demo purposes will launch at https://localhost:8443/cas
4. Change directory to `/app-router` or `/pages-router` depending on the router you would like to view the example for
5. Execute `npm run dev`. The Next.js example app will be available at http://localhost:3000
5. Execute `npm install` then `npm run dev`. The Next.js example app will be available at http://localhost:3000

**Note:** You may encounter a `NET:ERR_CERT_INVALID` error in your browser when attempting to visit the CAS login page. Bypass the error by trusting the page. The browser is attempting to protect you from visiting a suspicious secure site at https://localhost.

Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-cas-client",
"version": "1.2.2",
"version": "1.3.0",
"description": "A CAS client built for Next.js to authenticate, validate tickets, and provide session management to a CAS server",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down Expand Up @@ -67,9 +67,8 @@
"typescript-eslint": "^8.11.0"
},
"peerDependencies": {
"next": "^13.5.4 || ^14.0.3 || >=15.0.0-rc",
"react": ">=18 || >=19.0.0-beta",
"react-dom": ">=18 || >=19.0.0-beta"
"next": "^13 || ^14 || ^15",
"react": "^18 || ^19"
},
"engines": {
"node": ">=18.17.0"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/app/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { SessionData, SessionOptions } from '../session';
import { cookies } from 'next/headers';

export const getSession = async (): Promise<IronSession<SessionData>> => {
return await getIronSession<SessionData>(cookies(), SessionOptions);
return await getIronSession<SessionData>(await cookies(), SessionOptions);
};