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

Activated accounts only #1355

Merged
merged 59 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
83cfb71
Basic site key restrictions and scoring checks
forgetso Sep 12, 2024
862e0ca
site key registration in pow integration tests
forgetso Sep 12, 2024
c594dd8
Merge branch 'staging' into activated-accounts-only
forgetso Sep 12, 2024
a4ea455
get integration tests working
forgetso Sep 12, 2024
b4db259
don't double negative
forgetso Sep 12, 2024
ee9be45
Move error
forgetso Sep 13, 2024
5626753
link to FAQ when an error shows
forgetso Sep 13, 2024
1c9ffa6
Make score optional
forgetso Sep 13, 2024
5367915
lint-fix
forgetso Sep 13, 2024
b69ed44
Lint-fix
forgetso Sep 14, 2024
ebad311
Run admin api in cypress tests
forgetso Sep 14, 2024
f448b7a
pass timestamps in auth middleware tests
forgetso Sep 14, 2024
c58e540
Release 2.1.0 (#1371)
prosoponator Sep 19, 2024
06830ad
Remove score related stuff
forgetso Sep 20, 2024
304c6ce
Apply code scanning fix for information exposure through a stack trace
forgetso Sep 20, 2024
c0bfe32
Sort out test config
forgetso Sep 20, 2024
79e5a65
Don't send stacks via API
forgetso Sep 20, 2024
cab9fa6
Merge branch 'staging' into activated-accounts-only
forgetso Sep 20, 2024
97673f5
lint-fix
forgetso Sep 20, 2024
98fb634
Remove argument level
forgetso Sep 20, 2024
32aaa26
Add command to start provider with admin api
forgetso Sep 20, 2024
96a3f4d
Change command to work with concurrently
forgetso Sep 20, 2024
e1e7283
Update correct workflow
forgetso Sep 20, 2024
aba8672
Merge branch 'staging' into activated-accounts-only
forgetso Sep 20, 2024
d112c2c
Move imports
forgetso Sep 20, 2024
fe3f1f2
📦🔒
forgetso Sep 20, 2024
9dce7c2
lint-fix
forgetso Sep 21, 2024
817aa27
Bundle docs URL
forgetso Sep 21, 2024
ad59289
Move translation strings
forgetso Sep 23, 2024
1d3d1f1
Add test to catch translation keys missing
forgetso Sep 23, 2024
5c4ace9
Merge branch 'staging' into activated-accounts-only
forgetso Sep 23, 2024
60e9c00
Big locale overhaul
forgetso Sep 23, 2024
ed026a3
Big locale overhaul
forgetso Sep 23, 2024
8b29639
📦🔒
forgetso Sep 23, 2024
38a6b44
📦🔒
forgetso Sep 23, 2024
f5b29bd
📦🔒
forgetso Sep 23, 2024
d609ee6
tsconfig refs
forgetso Sep 23, 2024
93c96d5
📦🔒
forgetso Sep 23, 2024
cf93f5b
remove polkadot/util from common
forgetso Sep 23, 2024
d08fd29
Use correct package name
forgetso Sep 23, 2024
4856fa6
Use correct package name
forgetso Sep 23, 2024
12af1b8
lint-fix
forgetso Sep 23, 2024
c8efb92
package dir getters
forgetso Sep 23, 2024
a48e47c
Lint-fix and fix import
forgetso Sep 23, 2024
d7c5886
Address PR comments
forgetso Sep 23, 2024
3c47f57
specify no tests for the locale-browser package
forgetso Sep 23, 2024
a3431f3
More imports placed below license
forgetso Sep 23, 2024
20cf36a
Fix merge
forgetso Sep 23, 2024
d40f0d6
Lint-fix
forgetso Sep 23, 2024
24ada94
Merge branch 'staging' into locale-overhaul
forgetso Sep 23, 2024
e991c8c
Merge branch 'locale-overhaul' into activated-accounts-only
forgetso Sep 23, 2024
2d707c2
Merge branch 'staging' into activated-accounts-only
forgetso Sep 23, 2024
3bae3c1
Merge branch 'staging' into activated-accounts-only
forgetso Sep 24, 2024
437c6e6
Merge branch 'staging' into activated-accounts-only
forgetso Sep 24, 2024
58f5255
remove rogue npmignore
forgetso Sep 24, 2024
b412853
Merge branch 'staging' into activated-accounts-only
forgetso Sep 24, 2024
3e16f1a
Merge branch 'staging' into activated-accounts-only
forgetso Sep 24, 2024
7204656
Merge branch 'staging' into activated-accounts-only
forgetso Sep 24, 2024
99f1efb
merge main
forgetso Sep 24, 2024
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 demos/client-example/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export default defineConfig(async ({ command, mode }) => {
"process.env._DEV_ONLY_WATCH_EVENTS": JSON.stringify(
process.env._DEV_ONLY_WATCH_EVENTS,
),
"process.env.PROSOPO_DOCS_URL": JSON.stringify(
process.env.PROSOPO_DOCS_URL,
),
};
logger.debug("define", JSON.stringify(define));
return {
Expand Down
4 changes: 4 additions & 0 deletions demos/cypress-shared/cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { loadEnv } from "@prosopo/dotenv";
import { defineConfig } from "cypress";
import vitePreprocessor from "cypress-vite";
// Copyright 2021-2024 Prosopo (UK) Ltd.
Expand All @@ -15,10 +16,13 @@ import vitePreprocessor from "cypress-vite";
// limitations under the License.
import { nodePolyfills } from "vite-plugin-node-polyfills";

loadEnv();

export default defineConfig({
video: true,
headers: { "Accept-Encoding": "gzip, deflate" },
env: {
...process.env,
default_page: "/",
},
e2e: {
Expand Down
22 changes: 21 additions & 1 deletion demos/cypress-shared/cypress/e2e/captcha.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,33 @@
// limitations under the License.
/// <reference types="cypress" />
import "@cypress/xpath";
import { u8aToHex } from "@polkadot/util";
import { ProsopoDatasetError } from "@prosopo/common";
import { getPairAsync } from "@prosopo/contract";
import { datasetWithSolutionHashes } from "@prosopo/datasets";
import type { Captcha } from "@prosopo/types";
import { AdminApiPaths, type Captcha } from "@prosopo/types";
import { at } from "@prosopo/util";
import { checkboxClass } from "../support/commands.js";

describe("Captchas", () => {
before(async () => {
const timestamp = new Date().getTime();
const pair = await getPairAsync(Cypress.env("PROSOPO_PROVIDER_MNEMONIC"));
const signature = u8aToHex(pair.sign(timestamp.toString()));
const adminSiteKeyURL = `http://localhost:9229${AdminApiPaths.SiteKeyRegister}`;
await fetch(adminSiteKeyURL, {
method: "POST",
headers: {
"Content-Type": "application/json",
signature: signature,
timestamp: timestamp.toString(),
},
body: JSON.stringify({
siteKey: Cypress.env("PROSOPO_SITE_KEY"),
}),
});
});

beforeEach(() => {
const solutions = datasetWithSolutionHashes.captchas.map((captcha) => ({
captchaContentId: captcha.captchaContentId,
Expand Down
22 changes: 21 additions & 1 deletion demos/cypress-shared/cypress/e2e/correct.captcha.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,32 @@
// limitations under the License.
/// <reference types="cypress" />
import "@cypress/xpath";
import { u8aToHex } from "@polkadot/util";
import { ProsopoDatasetError } from "@prosopo/common";
import { getPairAsync } from "@prosopo/contract";
import { datasetWithSolutionHashes } from "@prosopo/datasets";
import type { Captcha } from "@prosopo/types";
import { AdminApiPaths, type Captcha } from "@prosopo/types";
import { checkboxClass } from "../support/commands.js";

describe("Captchas", () => {
before(async () => {
const timestamp = new Date().getTime();
const pair = await getPairAsync(Cypress.env("PROSOPO_PROVIDER_MNEMONIC"));
const signature = u8aToHex(pair.sign(timestamp.toString()));
const adminSiteKeyURL = `http://localhost:9229${AdminApiPaths.SiteKeyRegister}`;
await fetch(adminSiteKeyURL, {
method: "POST",
headers: {
"Content-Type": "application/json",
signature: signature,
timestamp: timestamp.toString(),
},
body: JSON.stringify({
siteKey: Cypress.env("PROSOPO_SITE_KEY"),
}),
});
});

beforeEach(() => {
const solutions = datasetWithSolutionHashes.captchas.map((captcha) => ({
captchaContentId: captcha.captchaContentId,
Expand Down
22 changes: 21 additions & 1 deletion demos/cypress-shared/cypress/e2e/correct.captcha.signup.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,32 @@
// limitations under the License.
/// <reference types="cypress" />
import "@cypress/xpath";
import { u8aToHex } from "@polkadot/util";
import { ProsopoDatasetError } from "@prosopo/common";
import { getPairAsync } from "@prosopo/contract";
import { datasetWithSolutionHashes } from "@prosopo/datasets";
import type { Captcha } from "@prosopo/types";
import { AdminApiPaths, type Captcha } from "@prosopo/types";
import { checkboxClass } from "../support/commands.js";

describe("Captchas", () => {
before(async () => {
const timestamp = new Date().getTime();
const pair = await getPairAsync(Cypress.env("PROSOPO_PROVIDER_MNEMONIC"));
const signature = u8aToHex(pair.sign(timestamp.toString()));
const adminSiteKeyURL = `http://localhost:9229${AdminApiPaths.SiteKeyRegister}`;
await fetch(adminSiteKeyURL, {
method: "POST",
headers: {
"Content-Type": "application/json",
signature: signature,
timestamp: timestamp.toString(),
},
body: JSON.stringify({
siteKey: Cypress.env("PROSOPO_SITE_KEY"),
}),
});
});

beforeEach(() => {
const solutions = datasetWithSolutionHashes.captchas.map((captcha) => ({
captchaContentId: captcha.captchaContentId,
Expand Down
Loading
Loading