Skip to content

Commit

Permalink
Merge branch 'master' of github.com:supertokens/supertokens-auth-reac…
Browse files Browse the repository at this point in the history
…t into feat/add-custom-property
  • Loading branch information
Chakravarthy7102 committed Sep 26, 2023
2 parents 4093a8a + 2565f9b commit 54d0aab
Show file tree
Hide file tree
Showing 64 changed files with 258 additions and 158 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.35.0] - 2023-09-XX
## [0.35.2] - 2023-09-24

### Test changes

- Split some test suites into multiple files to help with test parallelization

## [0.35.1] - 2023-09-21

### Test changes

- Test fixes for backend SDK CI

## [0.35.0] - 2023-09-21

### Overview

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/index.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_authRecipe.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_emailpassword.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_emailverification.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_multitenancy.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_passwordless.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_recipeModule.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_session.BooleanClaim.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_session.PrimitiveArrayClaim.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_session.PrimitiveClaim.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_session.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.ActiveDirectory.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.Apple.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.Bitbucket.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.BoxySAML.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.Discord.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.Facebook.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.Github.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.Gitlab.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.Google.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.GoogleWorkspaces.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.LinkedIn.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.Okta.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.Twitter.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdpartyemailpassword.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdpartypasswordless.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_userroles.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/modules/recipe_emailpassword.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/modules/recipe_emailverification.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/modules/recipe_multitenancy.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/modules/recipe_passwordless.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/modules/recipe_session.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/modules/recipe_thirdparty.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/modules/recipe_thirdpartyemailpassword.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/modules/recipe_thirdpartypasswordless.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/build/version.d.ts

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

2 changes: 1 addition & 1 deletion lib/ts/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
export const package_version = "0.35.1";
export const package_version = "0.35.2";
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "supertokens-auth-react",
"version": "0.35.1",
"version": "0.35.2",
"description": "ReactJS SDK that provides login functionality with SuperTokens.",
"main": "./index.js",
"engines": {
Expand Down
5 changes: 2 additions & 3 deletions test/end-to-end/accountlinking.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import {
getTextByDataSupertokens,
sendEmailResetPasswordSuccessMessage,
changeEmail,
backendBeforeEach,
} from "../helpers";
import { TEST_CLIENT_BASE_URL, TEST_SERVER_BASE_URL, SIGN_IN_UP_API, RESET_PASSWORD_API } from "../constants";

Expand All @@ -64,9 +65,7 @@ describe("SuperTokens Account linking", function () {

describe("Recipe combination tests", () => {
before(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down
17 changes: 5 additions & 12 deletions test/end-to-end/emailverification.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import {
isGeneralErrorSupported,
setGeneralErrorToLocalStorage,
isAccountLinkingSupported,
backendBeforeEach,
} from "../helpers";

describe("SuperTokens Email Verification", function () {
Expand All @@ -60,9 +61,7 @@ describe("SuperTokens Email Verification", function () {
let accountLinkingSupported;

before(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();
await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
}).catch(console.error);
Expand Down Expand Up @@ -675,9 +674,7 @@ describe("SuperTokens Email Verification general errors", function () {
const generalErrorMessageString = "General Error";

before(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();
await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
}).catch(console.error);
Expand Down Expand Up @@ -797,9 +794,7 @@ describe("SuperTokens Email Verification isEmailVerified server error", function

before(async function () {
// Start server.
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down Expand Up @@ -880,9 +875,7 @@ describe("Email verification signOut errors", function () {
let browser;
let page;
before(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down
6 changes: 2 additions & 4 deletions test/end-to-end/embed.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TEST_SERVER_BASE_URL } from "../constants";
import { AuthPage } from "./pages/AuthPage";
import { EmailVerificationPage } from "./pages/EmailVerificationPage";
import { ResetPasswordPage } from "./pages/ResetPasswordPage";
import { clearBrowserCookiesWithoutAffectingConsole, screenshotOnFailure } from "../helpers";
import { backendBeforeEach, clearBrowserCookiesWithoutAffectingConsole, screenshotOnFailure } from "../helpers";

describe("Embed components", async () => {
let browser;
Expand All @@ -17,9 +17,7 @@ describe("Embed components", async () => {
headless: true,
});

await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();
await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
}).catch(console.error);
Expand Down
13 changes: 4 additions & 9 deletions test/end-to-end/generalerror.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import {
loginWithAuth0,
isGeneralErrorSupported,
setGeneralErrorToLocalStorage,
backendBeforeEach,
} from "../helpers";

import {
Expand Down Expand Up @@ -70,9 +71,7 @@ describe("General error rendering", function () {
let browser;
let page;
before(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down Expand Up @@ -236,9 +235,7 @@ function getEmailPasswordTests(rid, ridForStorage) {
let browser;
let page;
before(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down Expand Up @@ -376,9 +373,7 @@ function getThirdPartyTests(rid, ridForStorage) {
let browser;
let page;
before(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down
24 changes: 6 additions & 18 deletions test/end-to-end/getRedirectionURL.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
clearBrowserCookiesWithoutAffectingConsole,
isPasswordlessSupported,
isThirdPartyPasswordlessSupported,
backendBeforeEach,
} from "../helpers";

import {
Expand All @@ -31,9 +32,7 @@ describe("getRedirectionURL Tests", function () {
let browser;
let page;
before(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down Expand Up @@ -81,9 +80,7 @@ describe("getRedirectionURL Tests", function () {
let browser;
let page;
before(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down Expand Up @@ -136,9 +133,7 @@ describe("getRedirectionURL Tests", function () {
let browser;
let page;
before(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down Expand Up @@ -208,12 +203,7 @@ describe("getRedirectionURL Tests", function () {
return;
}

await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await fetch(`${TEST_APPLICATION_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down Expand Up @@ -300,9 +290,7 @@ describe("getRedirectionURL Tests", function () {
return;
}

await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down
5 changes: 2 additions & 3 deletions test/end-to-end/multitenancy.dynamic_login_methods.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
isMultitenancySupported,
isMultitenancyManagementEndpointsSupported,
setupTenant,
backendBeforeEach,
} from "../helpers";
import {
TEST_CLIENT_BASE_URL,
Expand Down Expand Up @@ -65,9 +66,7 @@ describe("SuperTokens Multitenancy dynamic login methods", function () {
});

beforeEach(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

const startSTResp = await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down
9 changes: 4 additions & 5 deletions test/end-to-end/multitenancy.tenant_interactions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import {
addUserToTenant,
removeUserFromTenant,
removeTenant,
backendBeforeEach,
} from "../helpers";
import {
TEST_CLIENT_BASE_URL,
Expand All @@ -71,9 +72,7 @@ describe("SuperTokens Multitenancy tenant interactions", function () {
});

beforeEach(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down Expand Up @@ -1052,7 +1051,7 @@ describe("SuperTokens Multitenancy tenant interactions", function () {
await epSignIn(page, email);
});

it.skip("should be revoked when removing tenants", async function () {
it("should be revoked when removing tenants", async function () {
await setEnabledRecipes(page, ["emailpassword"]);
await setupTenant("public", {
emailPassword: { enabled: true },
Expand Down Expand Up @@ -1094,7 +1093,7 @@ describe("SuperTokens Multitenancy tenant interactions", function () {
{ name: "confirm-password", value: newPassword },
]);
await submitForm(page);
assert.strictEqual(await getGeneralError(page), "Invalid password reset token");
assert.strictEqual(await getGeneralError(page), "Something went wrong. Please try again.");
});
});

Expand Down
8 changes: 2 additions & 6 deletions test/end-to-end/passwordless.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
setGeneralErrorToLocalStorage,
getInputField,
isAccountLinkingSupported,
backendBeforeEach,
} from "../helpers";

import {
Expand Down Expand Up @@ -2121,12 +2122,7 @@ async function setupDevice(page, inputName, contactInfo, forLinkOnly = true, cle
}

async function initBrowser(contactMethod, consoleLogs, authRecipe, { defaultCountry, disablePhoneGuess } = {}) {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await fetch(`${TEST_APPLICATION_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down
5 changes: 2 additions & 3 deletions test/end-to-end/resetpasswordusingtoken.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import {
getResetPasswordFormBackButton,
waitForSTElement,
getResetPasswordSuccessBackToSignInButton,
backendBeforeEach,
} from "../helpers";

/*
Expand All @@ -63,9 +64,7 @@ describe("SuperTokens Reset password", function () {
let consoleLogs;

before(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down
5 changes: 2 additions & 3 deletions test/end-to-end/signin-rrdv5.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import {
screenshotOnFailure,
waitForText,
waitForSTElement,
backendBeforeEach,
} from "../helpers";
import fetch from "isomorphic-fetch";
import { SOMETHING_WENT_WRONG_ERROR } from "../constants";
Expand All @@ -68,9 +69,7 @@ describe("SuperTokens SignIn with react router dom v5", function () {
this.skip();
}

await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down
5 changes: 2 additions & 3 deletions test/end-to-end/signin-rrdv6.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import {
screenshotOnFailure,
waitForText,
waitForSTElement,
backendBeforeEach,
} from "../helpers";
import fetch from "isomorphic-fetch";
import { SOMETHING_WENT_WRONG_ERROR } from "../constants";
Expand All @@ -64,9 +65,7 @@ describe("SuperTokens SignIn with react router dom v6", function () {
let consoleLogs = [];

before(async function () {
await fetch(`${TEST_SERVER_BASE_URL}/beforeeach`, {
method: "POST",
}).catch(console.error);
await backendBeforeEach();

await fetch(`${TEST_SERVER_BASE_URL}/startst`, {
method: "POST",
Expand Down
Loading

0 comments on commit 54d0aab

Please sign in to comment.