Skip to content

Commit d814777

Browse files
authored
Server side session (#539)
* Server side session * Bump dependencies (react playground) * Skip email link auto-test * Publish - @corbado/connect-react@0.11.2 - @corbado/connect-web-js@0.8.2 - @corbado/react@3.2.0-alpha.0 - @corbado/shared-ui@3.2.0-alpha.0 - @corbado/web-core@3.2.0-alpha.0 - @corbado/web-js@3.2.0-alpha.0 * Use process-config endpoint (complete) * Publish - @corbado/connect-react@0.11.3 - @corbado/connect-web-js@0.8.3 - @corbado/react@3.2.1-alpha.0 - @corbado/shared-ui@3.2.1-alpha.0 - @corbado/web-core@3.2.1-alpha.0 - @corbado/web-js@3.2.1-alpha.0 * Dummy commit * Publish - @corbado/connect-react@0.11.4 - @corbado/connect-web-js@0.8.4 - @corbado/react@3.2.2-alpha.0 - @corbado/shared-ui@3.2.2-alpha.0 - @corbado/web-core@3.2.2-alpha.0 - @corbado/web-js@3.2.2-alpha.0 * Make axios external (web-core) * Publish - @corbado/connect-react@0.11.5 - @corbado/connect-web-js@0.8.5 - @corbado/react@3.2.3-alpha.0 - @corbado/shared-ui@3.2.3-alpha.0 - @corbado/web-core@3.2.3-alpha.0 - @corbado/web-js@3.2.3-alpha.0 * Stabilize connect tests
1 parent 1b5bf1c commit d814777

File tree

24 files changed

+1181
-2545
lines changed

24 files changed

+1181
-2545
lines changed

package-lock.json

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

packages/connect-react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@corbado/connect-react",
3-
"version": "0.11.1",
3+
"version": "0.11.5",
44
"description": "This package provides a set of React components to integrate passkeys into an existing authentication system.",
55
"author": "Martin Kellner <martin.kellner@corbado.com>",
66
"homepage": "https://github.com/corbado/javascript#readme",
@@ -31,7 +31,7 @@
3131
"url": "https://github.com/corbado/javascript/issues"
3232
},
3333
"dependencies": {
34-
"@corbado/web-core": "^3.1.2",
34+
"@corbado/web-core": "^3.2.3-alpha.0",
3535
"date-fns": "^3.6.0"
3636
},
3737
"devDependencies": {

packages/connect-web-js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@corbado/connect-web-js",
3-
"version": "0.8.1",
3+
"version": "0.8.5",
44
"description": "This package provides a set of components to integrate passkeys into an existing authentication system",
55
"author": "Martin Kellner <martin.kellner@corbado.com>",
66
"homepage": "https://github.com/corbado/javascript#readme",
@@ -34,7 +34,7 @@
3434
"url": "https://github.com/corbado/javascript/issues"
3535
},
3636
"dependencies": {
37-
"@corbado/connect-react": "^0.11.1",
37+
"@corbado/connect-react": "^0.11.5",
3838
"react": "^18.2.0",
3939
"react-dom": "^18.2.0"
4040
},

packages/react/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@corbado/react",
3-
"version": "3.1.3",
3+
"version": "3.2.3-alpha.0",
44
"description": "This package provides all the functionalities and UI components needed by developers when integration Corbado's Authentication management system in their react application",
55
"author": "Abdullah Shahbaz <abdullah_ghani@live.com>",
66
"homepage": "https://github.com/corbado/javascript#readme",
@@ -31,9 +31,9 @@
3131
"url": "https://github.com/corbado/javascript/issues"
3232
},
3333
"dependencies": {
34-
"@corbado/shared-ui": "^3.1.2",
34+
"@corbado/shared-ui": "^3.2.3-alpha.0",
3535
"@corbado/shared-util": "^1.0.12",
36-
"@corbado/web-core": "^3.1.2",
36+
"@corbado/web-core": "^3.2.3-alpha.0",
3737
"i18next": "23.5.1",
3838
"i18next-browser-languagedetector": "7.1.0",
3939
"libphonenumber-js": "^1.10.59",

packages/shared-ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@corbado/shared-ui",
3-
"version": "3.1.2",
3+
"version": "3.2.3-alpha.0",
44
"description": "This package contains shared files for all the complete packages of Corbado for VanillaJS, React, Angular, Vue, etc.",
55
"author": "Abdullah Shahbaz <abdullah_ghani@live.com>",
66
"homepage": "https://github.com/corbado/javascript#readme",
@@ -44,7 +44,7 @@
4444
"**/*.json"
4545
],
4646
"dependencies": {
47-
"@corbado/web-core": "^3.1.2",
47+
"@corbado/web-core": "^3.2.3-alpha.0",
4848
"rxjs": "^7.8.1",
4949
"ua-parser-js": "^1.0.37"
5050
},

packages/shared-ui/src/flowHandler/blocks/EmailVerifyBlock.ts

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export class EmailVerifyBlock extends Block<BlockDataEmailVerify> {
1919
readonly type = BlockTypes.EmailVerify;
2020
readonly initialScreen;
2121
readonly authType: AuthType;
22-
readonly isNewDevice: boolean;
2322
readonly emailLinkToken?: string;
2423

2524
constructor(
@@ -30,7 +29,6 @@ export class EmailVerifyBlock extends Block<BlockDataEmailVerify> {
3029
data: GeneralBlockVerifyIdentifier,
3130
authType: AuthType,
3231
fromEmailVerifyFromUrl: boolean,
33-
isNewDevice: boolean,
3432
emailLinkToken?: string,
3533
) {
3634
super(app, flowHandler, common, errorTranslator);
@@ -51,7 +49,6 @@ export class EmailVerifyBlock extends Block<BlockDataEmailVerify> {
5149
}
5250

5351
this.authType = authType;
54-
this.isNewDevice = isNewDevice;
5552
this.emailLinkToken = emailLinkToken;
5653

5754
this.data = {
@@ -71,7 +68,7 @@ export class EmailVerifyBlock extends Block<BlockDataEmailVerify> {
7168
data: GeneralBlockVerifyIdentifier,
7269
authType: AuthType,
7370
): EmailVerifyBlock {
74-
return new EmailVerifyBlock(app, flowHandler, common, translator, data, authType, false, false);
71+
return new EmailVerifyBlock(app, flowHandler, common, translator, data, authType, false);
7572
}
7673

7774
static fromUrl(
@@ -80,7 +77,6 @@ export class EmailVerifyBlock extends Block<BlockDataEmailVerify> {
8077
translator: ErrorTranslator,
8178
data: GeneralBlockVerifyIdentifier,
8279
authType: AuthType,
83-
isNewDevice: boolean,
8480
emailLinkToken: string,
8581
): EmailVerifyBlock {
8682
const emptyCommon: ProcessCommon = {
@@ -90,17 +86,7 @@ export class EmailVerifyBlock extends Block<BlockDataEmailVerify> {
9086
environment: '',
9187
};
9288

93-
return new EmailVerifyBlock(
94-
app,
95-
flowHandler,
96-
emptyCommon,
97-
translator,
98-
data,
99-
authType,
100-
true,
101-
isNewDevice,
102-
emailLinkToken,
103-
);
89+
return new EmailVerifyBlock(app, flowHandler, emptyCommon, translator, data, authType, true, emailLinkToken);
10490
}
10591

10692
showEditEmail() {
@@ -163,11 +149,7 @@ export class EmailVerifyBlock extends Block<BlockDataEmailVerify> {
163149
throw new Error('Email link token is missing');
164150
}
165151

166-
const res = await this.app.authProcessService.finishEmailLinkVerification(
167-
abortController,
168-
this.emailLinkToken,
169-
this.isNewDevice,
170-
);
152+
const res = await this.app.authProcessService.finishEmailLinkVerification(abortController, this.emailLinkToken);
171153

172154
this.updateProcess(res);
173155

packages/shared-ui/src/flowHandler/processHandler.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ export class ProcessHandler {
198198
this.#errorTranslator,
199199
emailVerifyFromUrl.data,
200200
emailVerifyFromUrl.authType,
201-
emailVerifyFromUrl.isNewDevice,
202201
emailVerifyFromUrl.token,
203202
) as Block<unknown>;
204203

packages/tests-e2e/src/complete/models/corbado-auth-blocks/EmailVerifyBlockModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class EmailVerifyBlockModel {
8181
},
8282
authType: authType,
8383
process: {
84-
id: cboAuthProcess.id,
84+
tempId: cboAuthProcess.id,
8585
expires: cboAuthProcess.expires,
8686
frontendApiUrl: cboAuthProcess.frontendApiUrl,
8787
},

packages/tests-e2e/src/complete/scenarios/corbado-auth-general/email-link-verify-obfuscation.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ test.describe('email-verify block should obfuscate email addresses if they have
3737
killPlaygroundNew(server);
3838
});
3939

40-
test('email is obfuscated during login if the login is started with username', async ({ model, page }) => {
40+
// we need to receive an actual email to run this test
41+
test.skip('email is obfuscated during login if the login is started with username', async ({ model, page }) => {
4142
await model.load(projectId, port, false, 'signup-init');
4243

4344
const email = SignupInitBlockModel.generateRandomEmail();

packages/tests-e2e/src/connect/scenarios/append.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ test.describe('append flows', () => {
6363
// First attempt to create passkey is cancelled, user skips, then sets up TOTP and logs in later
6464
await virtualAuthenticator.modeCancel();
6565
const postLoginPage = await signupPage.submit(email, TestDataFactory.phoneNumber, TestDataFactory.password);
66+
await postLoginPage.awaitPage();
6667
const mfaPage = await postLoginPage.skipAfterSignup();
6768

6869
// Confirm TOTP to end on profile

0 commit comments

Comments
 (0)