From 039641e337527a9ce9380ff5abb0989455bd0ff4 Mon Sep 17 00:00:00 2001 From: Marco Castignoli Date: Mon, 31 Jul 2023 12:06:27 +0200 Subject: [PATCH 1/5] experiment with Cross-Origin Resource Sharing --- src/server/server.ts | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/server/server.ts b/src/server/server.ts index 8a8e60cbe..3808c9975 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -256,20 +256,25 @@ export class Server { this.app.use(genericErrorHandler); this.app.use(notFoundHandler); - /* this.app.get("/auth0", (req, res) => { + this.app.get("/auth0", (req, res) => { res.send(` - - - - - + + + + + + + + + `); - }); */ + }); } async listen(callback?: () => void) { From 556f2839a124223478870d4c66f78dc7676a172b Mon Sep 17 00:00:00 2001 From: Marco Castignoli Date: Mon, 31 Jul 2023 14:04:55 +0200 Subject: [PATCH 2/5] bypass Intelligent Tracking Prevention with refresh tokens and cachelocation=localstorage --- src/server/server.ts | 20 -------------------- ui/src/index.tsx | 2 ++ 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/server/server.ts b/src/server/server.ts index 3808c9975..2c74333d9 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -255,26 +255,6 @@ export class Server { this.app.use("/", routes); this.app.use(genericErrorHandler); this.app.use(notFoundHandler); - - this.app.get("/auth0", (req, res) => { - res.send(` - - - - - - - - - - `); - }); } async listen(callback?: () => void) { diff --git a/ui/src/index.tsx b/ui/src/index.tsx index 6426dd749..0bbd99719 100644 --- a/ui/src/index.tsx +++ b/ui/src/index.tsx @@ -17,6 +17,8 @@ ReactDOM.render( audience: AUTH0_AUDIENCE, scope: "openid profile", }} + useRefreshTokens={true} + cacheLocation="localstorage" > From efe8949d305375e85d19737fa2bedd5fdc049614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?= Date: Mon, 31 Jul 2023 14:23:12 +0200 Subject: [PATCH 3/5] Fix fallback ipfs --- environments/.env.secrets.gpg | Bin 3029 -> 3036 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/environments/.env.secrets.gpg b/environments/.env.secrets.gpg index 466ee54d598b14f3a49824b5d0a753abe9e23d6b..1afe35e2e06afbb715cb2c1d773da2bbee0f7a34 100644 GIT binary patch literal 3036 zcmV<23nTQ54Fm}T0^G}=z&kT1(EHNr0fGiG5a(2RM9_^~9;xDX{i<_CQp7#jd~g9H z@bW-cIrwxh>g*aE0#inaaChvsj}@mr@XAmE9m04HDskqYp!~ppY{RxeGQwNA{Y&uc zYTNVmY2=myw1(xn`jSijm}lGTqhVv@qv`Q>J6KLCD3_{0k#2bLbeGQ_T0olBNsQ+q zKy6o$t36x)J@z2bcq}B^n3@syjMx8WS+VrpYJ6iK&gmCN?iTBB6_#!Di4zZ_5WY%& zS@jZjm7amjW0wg^{CXQ#yJE*;#G090W`g&$Nl@8;8|s6^K(7SSzn1t!0i(L3yzv< ztCOQ8u3!Zy6A;66rHPW8-t%^`A{FrvV|O}PyuQI?6jJ1Htqwl6TY)B&RS&GCD+fKk z#8mH9D6re@Eb|>IIrH+vbs(}dY2>HS$rzP`(jB6gl(AB#0w}x()vjLXZ6yv1wFGSt z59?4BfVNxs=d3M*>*8d`>u*~XSO%~aTO`OF@kLuN7N#ygS^=kkU7b%w%(v$}U}+(w zkO}qmy71?}ay*-}py6Ra55%&8{0HQ7+pHpGt@`0`Tw&4L5xIS_e<8hp$lCj~+E$;< zuw^MBJC8Ztrgx{l_b=9ISj=O)-&ogl8pYF`h(bfIJ=`X zrBC}fIxOw|Ywpi13N8e%sT*TdG(QujX}w3cg4>t2i*T6EB(v}_y%ij1iR4eSq#6cK z$BnTFu(Jf#bQE)9z!JjcEvF_Ig_iFIy!0@>LJgG!R3_kS-`oN%NQXy^71Rb~t4JAIUw`IUp(WQ(j@mkD$6$fM3PI<@ZCh1k;m7HONw%Y6TVmv7uY8>i=& z%K4tncAB-hg@yhHFh%sfC-s>8QT#fjx_$90i4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--- ui/src/index.tsx | 2 +- .../CheckedContractsView/CheckedContract/Create2Form/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/index.tsx b/ui/src/index.tsx index 0bbd99719..92d5e984e 100644 --- a/ui/src/index.tsx +++ b/ui/src/index.tsx @@ -15,7 +15,7 @@ ReactDOM.render( clientId={AUTH0_CLIENTID} authorizationParams={{ audience: AUTH0_AUDIENCE, - scope: "openid profile", + scope: "openid profile offline_access", }} useRefreshTokens={true} cacheLocation="localstorage" diff --git a/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/Create2Form/index.tsx b/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/Create2Form/index.tsx index f7ac0b18d..a3c765c0d 100644 --- a/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/Create2Form/index.tsx +++ b/ui/src/pages/Verifier/CheckedContractsView/CheckedContract/Create2Form/index.tsx @@ -189,7 +189,7 @@ const Create2Form = ({ setClientToken(accessToken); } catch (e: any) { - console.log("test", e.message); + console.log(e.message); } }; From 64209e6907fee9bd362fc6d7e97dc677e7103ef8 Mon Sep 17 00:00:00 2001 From: Marco Castignoli Date: Mon, 31 Jul 2023 15:17:44 +0200 Subject: [PATCH 5/5] add missing offline_access to create2 tests --- test/helpers/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helpers/helpers.js b/test/helpers/helpers.js index cbed99abf..ec5b6cebd 100644 --- a/test/helpers/helpers.js +++ b/test/helpers/helpers.js @@ -168,7 +168,7 @@ function callWithAccessToken(callback) { password: password, audience: AUDIENCE, client_id: CLIENT_ID, - scope: "openid profile", + scope: "openid profile offline_access", }; fetch(`${AUTH0_DOMAIN}/oauth/token`, {