Skip to content

Commit 3ac9d76

Browse files
authored
Bump webauthn-json fork (#527)
* Bump webauthn-json fork * Prettier * Address parts of the vulnarabilities from playgrounds and toolings (only internal so not a big problem) * Address more tooling vulns (non-breaking, for the rest we have to replace CRA) * Update to Next15 in connect-next playground * Prettier
1 parent d886e48 commit 3ac9d76

17 files changed

Lines changed: 7158 additions & 8316 deletions

File tree

package-lock.json

Lines changed: 7121 additions & 8212 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"eslint-plugin-simple-import-sort": "10.0.0",
4040
"lerna": "^8.1.8",
4141
"node-fetch": "^3.3.2",
42-
"pm2": "^5.3.0",
4342
"prettier": "^3.1.0",
4443
"rimraf": "^5.0.5",
4544
"ts-loader": "^9.5.1",

packages/connect-react/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@
3232
},
3333
"dependencies": {
3434
"@corbado/web-core": "^3.0.1",
35-
"date-fns": "^3.6.0",
36-
"i18next": "23.5.1",
37-
"i18next-browser-languagedetector": "7.1.0",
38-
"react-i18next": "13.2.2"
35+
"date-fns": "^3.6.0"
3936
},
4037
"devDependencies": {
4138
"@corbado/types": "^3.0.1",

packages/connect-react/webpack.prod.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,5 @@ module.exports = merge(common, {
2020
externals: {
2121
'@corbado/web-core': '@corbado/web-core',
2222
react: 'react',
23-
i18next: 'i18next',
24-
'i18next-browser-languagedetector': 'i18next-browser-languagedetector',
25-
'react-i18next': 'react-i18next',
2623
},
2724
});

packages/react/changelog.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
- Fix a bug where passkey-append aborts in rare cases when users create a passkey right after signup.
66

7-
87
## 3.0.0
98

109
### Major changes

packages/web-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
"url": "https://github.com/corbado/javascript/issues"
3535
},
3636
"dependencies": {
37-
"@corbado/webauthn-json": "^2.1.2",
37+
"@corbado/webauthn-json": "^2.2.0",
3838
"@fingerprintjs/fingerprintjs": "^3.4.2",
39-
"axios": "^1.7.4",
39+
"axios": "^1.8.4",
4040
"detectincognitojs": "^1.3.7",
4141
"loglevel": "^1.8.1",
4242
"rxjs": "^7.8.1",

playground/connect-next/app/actions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
import { cookies } from 'next/headers';
44

55
export async function getAppendToken() {
6-
const displayName = cookies().get('displayName');
6+
const cookieStore = await cookies();
7+
const displayName = cookieStore.get('displayName');
78
if (!displayName) {
89
return null;
910
}
1011

11-
const identifier = cookies().get('identifier');
12+
const identifier = cookieStore.get('identifier');
1213
if (!identifier) {
1314
return null;
1415
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { cookies } from 'next/headers';
22
import Home from '@/app/home/client';
33

4-
export default function Page() {
5-
const maybeSecretCode = cookies().get('secretCode');
4+
export default async function Page() {
5+
const cookieStore = await cookies();
6+
const maybeSecretCode = cookieStore.get('secretCode');
67

78
return <Home maybeSecretCode={maybeSecretCode?.value} />;
89
}

playground/connect-next/app/login/actions.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ export async function postPasskeyLogin(session: string) {
3636

3737
const email = response.UserAttributes?.find(attr => attr.Name === 'email')?.Value;
3838
if (email) {
39-
cookies().set('displayName', email);
40-
cookies().set('identifier', username);
39+
const cookieStore = await cookies();
40+
cookieStore.set('displayName', email);
41+
cookieStore.set('identifier', username);
4142
}
4243

4344
return;
@@ -64,7 +65,8 @@ export async function postPasskeyLoginNew(signedPasskeyData: string, clientState
6465
await postPasskeyLogin(out.session);
6566

6667
// update client side state
67-
cookies().set({ name: 'cbo_client_state', value: clientState, httpOnly: true });
68+
const cookieStore = await cookies();
69+
cookieStore.set({ name: 'cbo_client_state', value: clientState, httpOnly: true });
6870
}
6971

7072
function createSecretHash(username: string, clientId: string, clientSecret: string) {
@@ -80,7 +82,8 @@ export async function startConventionalLogin(email: string, password: string) {
8082
throw new Error('Email and password are required.');
8183
}
8284

83-
cookies().set('displayName', email);
85+
const cookieStore = await cookies();
86+
cookieStore.set('displayName', email);
8487

8588
const client = new CognitoIdentityProviderClient({
8689
region: process.env.AWS_REGION!,
@@ -113,14 +116,14 @@ export async function startConventionalLogin(email: string, password: string) {
113116
const decoded = await verifyToken(response.AuthenticationResult.AccessToken);
114117
const username = decoded.username;
115118
if (email) {
116-
cookies().set('identifier', username);
119+
cookieStore.set('identifier', username);
117120
}
118121

119122
return { success: true };
120123
}
121124

122125
if (response.Session && response.ChallengeName === 'SOFTWARE_TOKEN_MFA') {
123-
cookies().set('mfa_session', response.Session);
126+
cookieStore.set('mfa_session', response.Session);
124127

125128
return { success: true, screen: 'MFA_SOFTWARE_TOKEN' };
126129
}

playground/connect-next/app/login/page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ export type Props = {
55
clientState: string | undefined;
66
};
77

8-
export default function LoginPage() {
9-
const clientState = cookies().get('cbo_client_state');
8+
export default async function LoginPage() {
9+
const cookieStore = await cookies();
10+
const clientState = cookieStore.get('cbo_client_state');
1011
console.log('clientState', clientState);
1112

1213
return <LoginComponent clientState={clientState?.value} />;

0 commit comments

Comments
 (0)