Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
2ef4cb9
Add third flow for testing webauthn signup on accountlinking disabled
deepjyoti30-st Mar 17, 2025
5a8a6d5
Add init support for testing e2e test flow 2 with webauthn user chang…
deepjyoti30-st Mar 18, 2025
4031702
Add some changes for the test flows
deepjyoti30-st Mar 18, 2025
37eea51
Add fixes for the e2e tests
deepjyoti30-st Mar 20, 2025
a23dda2
Add fix for properly checking error for webauthn
deepjyoti30-st Mar 21, 2025
0f6a3f6
Undo index changes
deepjyoti30-st Mar 21, 2025
2414931
test: update test to match new testing method
porcellus May 29, 2025
f947a91
Remove console log
deepjyoti30-st Jun 2, 2025
0ca95fb
Remove run tests check workflow
deepjyoti30-st Jun 3, 2025
d63bf45
Update pre-commit hook workflow to make it pass
deepjyoti30-st Jun 3, 2025
aa490f6
Fix examples test workflow to use latest actions
deepjyoti30-st Jun 3, 2025
6630842
Get rid of git commit step in pre-commit hook workflow
deepjyoti30-st Jun 3, 2025
1aa77da
Update pre-commit hook to remove chown step
deepjyoti30-st Jun 3, 2025
557a131
Fix dep version for svelte-navigator crashing the npm i step
deepjyoti30-st Jun 4, 2025
350f74d
Skip install post install scripts for deps
deepjyoti30-st Jun 4, 2025
0c57b8a
Fix some example build failures leading to test failures
deepjyoti30-st Jun 4, 2025
c05d096
Fix another example build failure leading to failing test
deepjyoti30-st Jun 4, 2025
08e01fe
Add fix for accountlinking and mfa tests
deepjyoti30-st Jun 5, 2025
8ac94ab
Fix webauthn accountlinking tests
deepjyoti30-st Jun 5, 2025
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
13 changes: 3 additions & 10 deletions .github/workflows/pre-commit-hook-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,8 @@ jobs:
pr-title:
name: Pre commit hook check
runs-on: ubuntu-latest
container: rishabhpoddar/supertokens_website_sdk_testing_node_16
steps:
- uses: actions/checkout@v2
- run: git init && git add --all && git -c user.name='test' -c user.email='[email protected]' commit -m 'init for pr action'
- run: npm i --force || true
# the below command is there cause otherwise running npm run check-circular-dependencies gives an error like:
# Your cache folder contains root-owned files, due to a bug in
# npm ERR! previous versions of npm which has since been addressed.
- run: chown -R 1001:121 "/github/home/.npm"
- run: npm i --force
- run: cd test/with-typescript && npm i --force
- uses: actions/checkout@v4
- run: npm ci
- run: cd test/with-typescript && npm ci
- run: ./hooks/pre-commit.sh
6 changes: 3 additions & 3 deletions .github/workflows/test-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: bash test/findExamplesWithTests.sh
- id: set-matrix
run: echo "::set-output name=matrix::{\"include\":$(bash test/findExamplesWithTests.sh)}"
Expand All @@ -24,7 +24,7 @@ jobs:
run:
working-directory: ${{ matrix.examplePath }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: bash ../../test/updateExampleAppDeps.sh .
- run: npm install [email protected] [email protected] puppeteer@^11.0.0 isomorphic-fetch@^3.0.0
- run: npm run build || true
Expand All @@ -36,7 +36,7 @@ jobs:
)
- name: The job has failed
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: screenshots
path: ./**/*screenshot.jpeg
24 changes: 0 additions & 24 deletions .github/workflows/tests-pass-check-pr.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const LinkingPage: React.FC = () => {
try {
let response = await Passwordless.createCode({
phoneNumber,
shouldTryLinkingWithSessionUser: true,
});

if (cancel) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react-dom": "^18.2.0",
"react-router-dom": "^6.2.1",
"react-scripts": "5.0.1",
"supertokens-auth-react": "github:supertokens/supertokens-auth-react#feat/mfa_redirect",
"supertokens-auth-react": "github:supertokens/supertokens-auth-react",
"supertokens-web-js": "latest",
"typescript": "^4.8.2",
"web-vitals": "^2.1.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export default function SelectPhone() {
navigate: nav,
});
} else if (loadedInfo.user.phoneNumbers.length === 1) {
await Passwordless.createCode({ phoneNumber: loadedInfo.user.phoneNumbers[0] });
await Passwordless.createCode({
phoneNumber: loadedInfo.user.phoneNumbers[0],
shouldTryLinkingWithSessionUser: true,
});
await MultiFactorAuth.redirectToFactor({
factorId: MultiFactorAuth.FactorIds.OTP_PHONE,
redirectBack: false,
Expand Down Expand Up @@ -60,7 +63,7 @@ export default function SelectPhone() {
<li
className="phoneNumberCard"
onClick={() => {
Passwordless.createCode({ phoneNumber: number })
Passwordless.createCode({ phoneNumber: number, shouldTryLinkingWithSessionUser: true })
.then(async (info) => {
if (info.status !== "OK") {
setError(info.reason);
Expand All @@ -72,6 +75,7 @@ export default function SelectPhone() {
contactMethod: "PHONE",
contactInfo: number,
hasOtherPhoneNumbers: true,
shouldTryLinkingWithSessionUser: true,
},
});
return MultiFactorAuth.redirectToFactor({
Expand Down
4 changes: 2 additions & 2 deletions examples/with-multiple-email-sign-in/api-server/epOverride.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function epOverride(oI: APIInterface): APIInterface {
signInPOST: async function (input) {
const emailField = input.formFields.find((f) => f.id === "email")!;

let primaryEmail = getPrimaryEmailFromInputEmail(emailField.value);
let primaryEmail = getPrimaryEmailFromInputEmail(emailField.value as string);
if (primaryEmail !== undefined) {
emailField.value = primaryEmail;
}
Expand All @@ -16,7 +16,7 @@ export function epOverride(oI: APIInterface): APIInterface {
signUpPOST: async function (input) {
const emailField = input.formFields.find((f) => f.id === "email")!;

let primaryEmail = getPrimaryEmailFromInputEmail(emailField.value);
let primaryEmail = getPrimaryEmailFromInputEmail(emailField.value as string);
if (primaryEmail !== undefined) {
emailField.value = primaryEmail;
}
Expand Down
4 changes: 2 additions & 2 deletions examples/with-phone-password-mfa/api-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ supertokens.init({
// We format the phone number here to get it to a standard format
const emailField = input.formFields.find((field) => field.id === "email");
if (emailField) {
const phoneNumber = parsePhoneNumber(emailField.value);
const phoneNumber = parsePhoneNumber(emailField.value as string);
if (phoneNumber !== undefined && phoneNumber.isValid()) {
emailField.value = phoneNumber.number;
}
Expand All @@ -93,7 +93,7 @@ supertokens.init({
// We format the phone number here to get it to a standard format
const emailField = input.formFields.find((field) => field.id === "email");
if (emailField) {
const phoneNumber = parsePhoneNumber(emailField.value);
const phoneNumber = parsePhoneNumber(emailField.value as string);
if (phoneNumber !== undefined && phoneNumber.isValid()) {
emailField.value = phoneNumber.number;
}
Expand Down
4 changes: 2 additions & 2 deletions examples/with-phone-password/api-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ supertokens.init({
// We format the phone number here to get it to a standard format
const emailField = input.formFields.find((field) => field.id === "email");
if (emailField) {
const phoneNumber = parsePhoneNumber(emailField.value);
const phoneNumber = parsePhoneNumber(emailField.value as string);
if (phoneNumber !== undefined && phoneNumber.isValid()) {
emailField.value = phoneNumber.number;
}
Expand All @@ -91,7 +91,7 @@ supertokens.init({
// We format the phone number here to get it to a standard format
const emailField = input.formFields.find((field) => field.id === "email");
if (emailField) {
const phoneNumber = parsePhoneNumber(emailField.value);
const phoneNumber = parsePhoneNumber(emailField.value as string);
if (phoneNumber !== undefined && phoneNumber.isValid()) {
emailField.value = phoneNumber.number;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"sirv-cli": "^2.0.0",
"supertokens-auth-react": "latest",
"supertokens-node": "latest",
"svelte-navigator": "^3.1.5"
"svelte-navigator": "latest"
}
}
2 changes: 1 addition & 1 deletion test/end-to-end/accountlinking.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ async function tryEmailPasswordSignUp(page, email) {
await new Promise((res) => setTimeout(res, 250));
}

async function tryPasswordlessSignInUp(page, email) {
export async function tryPasswordlessSignInUp(page, email) {
await page.evaluate(() => localStorage.removeItem("supertokens-passwordless-loginAttemptInfo"));
await Promise.all([
page.goto(`${TEST_CLIENT_BASE_URL}/auth/?authRecipe=passwordless`),
Expand Down
Loading
Loading