diff --git a/.changeset/calm-icons-develop.md b/.changeset/calm-icons-develop.md new file mode 100644 index 000000000..6cd455ec3 --- /dev/null +++ b/.changeset/calm-icons-develop.md @@ -0,0 +1,5 @@ +--- +"@blockchain-lab-um/masca": patch +--- + +Use external verification for verifyData rpc. diff --git a/.changeset/eleven-eyes-hide.md b/.changeset/eleven-eyes-hide.md new file mode 100644 index 000000000..cc9a144a8 --- /dev/null +++ b/.changeset/eleven-eyes-hide.md @@ -0,0 +1,5 @@ +--- +"@blockchain-lab-um/dapp": patch +--- + +Replaced shared presentation verifying lib. diff --git a/.changeset/pre.json b/.changeset/pre.json index dafb810d0..013505fe1 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -15,5 +15,9 @@ "@blockchain-lab-um/masca": "1.2.2", "@blockchain-lab-um/masca-types": "1.3.2" }, - "changesets": [] -} \ No newline at end of file + "changesets": [ + "five-poets-yell", + "rich-pandas-add", + "young-forks-jog" + ] +} diff --git a/.changeset/young-forks-jog.md b/.changeset/young-forks-jog.md new file mode 100644 index 000000000..f1204ee82 --- /dev/null +++ b/.changeset/young-forks-jog.md @@ -0,0 +1,5 @@ +--- +"@blockchain-lab-um/masca": patch +--- + +Adjust nbf and iat for idtoken signing diff --git a/packages/dapp/CHANGELOG.md b/packages/dapp/CHANGELOG.md index fb5eae5b6..fb8882559 100644 --- a/packages/dapp/CHANGELOG.md +++ b/packages/dapp/CHANGELOG.md @@ -1,5 +1,13 @@ # @blockchain-lab-um/dapp +## 1.3.2-beta.0 + +### Patch Changes + +- [#609](https://github.com/blockchain-lab-um/masca/pull/609) [`5cb712a`](https://github.com/blockchain-lab-um/masca/commit/5cb712ad40156207f41c3f2fd863f0ad0472791a) Thanks [@pseudobun](https://github.com/pseudobun)! - Adds reclaim option for campaigns. + +- [#614](https://github.com/blockchain-lab-um/masca/pull/614) [`fc1f796`](https://github.com/blockchain-lab-um/masca/commit/fc1f796ad66b5dbceccd0d96f64e2d98cfca71f0) Thanks [@tadejpodrekar](https://github.com/tadejpodrekar)! - Adds campaign issue checks. + ## 1.3.1 ### Patch Changes diff --git a/packages/dapp/next.config.js b/packages/dapp/next.config.js index 5a015fabd..ec4c5e57e 100644 --- a/packages/dapp/next.config.js +++ b/packages/dapp/next.config.js @@ -112,6 +112,7 @@ const nextConfig = { }, webpack: (config) => { + config.externals.push('pino-pretty'); config.module.rules.push({ test: /\.svg$/, use: ['@svgr/webpack'], diff --git a/packages/dapp/package.json b/packages/dapp/package.json index 408a16a8a..0943ea6ff 100644 --- a/packages/dapp/package.json +++ b/packages/dapp/package.json @@ -1,6 +1,6 @@ { "name": "@blockchain-lab-um/dapp", - "version": "1.3.1", + "version": "1.3.2-beta.0", "private": true, "license": "(Apache-2.0 AND MIT)", "type": "commonjs", @@ -20,6 +20,7 @@ }, "dependencies": { "@blockchain-lab-um/did-provider-key": "1.0.8", + "@blockchain-lab-um/extended-verification": "0.1.2", "@blockchain-lab-um/masca-connector": "1.3.2", "@blockchain-lab-um/oidc-types": "0.0.8", "@headlessui/react": "^1.7.18", diff --git a/packages/dapp/src/app/api/og/route.tsx b/packages/dapp/src/app/api/og/route.tsx index b4836dcb3..811917c3b 100644 --- a/packages/dapp/src/app/api/og/route.tsx +++ b/packages/dapp/src/app/api/og/route.tsx @@ -1,3 +1,4 @@ +import { formatDid } from '@/utils/format'; import { ImageResponse } from '@vercel/og'; import type { NextRequest } from 'next/server'; @@ -96,7 +97,7 @@ export async function GET(req: NextRequest) { fontWeight: 'normal', }} > - {credentialIssuer} + {formatDid(credentialIssuer)}
ACHIEVED
- {credentialIssuer.substring(0, 10)}... - {credentialIssuer.substring( - holder.length, - holder.length - 10 - )} + {formatDid(credentialIssuer)}
ISSUED TO
- {credentialSubject.substring(0, 10)}... - {credentialSubject.substring( - holder.length, - holder.length - 10 - )} + {formatDid(credentialSubject)}
ISSUED ON
= + await VerificationService.verify( + presentation as W3CVerifiablePresentation + ); - if (!verified) { - return new NextResponse('Presentation not valid', { - status: 400, + if (isError(verifiedResult)) { + return new NextResponse('Failed to verify presentation', { + status: 500, headers: { ...CORS_HEADERS, }, }); } + if (!verifiedResult.data.verified) { + return NextResponse.json( + { + message: 'Invalid presentation', + details: verifiedResult.data.details, + }, + { + status: 400, + headers: { + ...CORS_HEADERS, + }, + } + ); + } + const supabase = supabaseServiceRoleClient(); const { data, error } = await supabase diff --git a/packages/dapp/src/components/AddressPopover/index.tsx b/packages/dapp/src/components/AddressPopover/index.tsx index 7589cf6b7..25a46a165 100644 --- a/packages/dapp/src/components/AddressPopover/index.tsx +++ b/packages/dapp/src/components/AddressPopover/index.tsx @@ -75,7 +75,7 @@ const AddressPopover = ({ did, disconnect }: AddressPopoverProps) => {
DID
-
+
{did ? ( { @@ -106,7 +112,7 @@ export const RequirementDisplay = ({ if (!issuer) return acc; if ( - !issuer.includes('did:poylgonid') && + !issuer.includes('did:polygonid') && !issuer.includes('did:iden3') ) { acc.push(credential); diff --git a/packages/dapp/src/components/CampaignsDisplay/index.tsx b/packages/dapp/src/components/CampaignsDisplay/index.tsx index 509d59df4..e9f8f231f 100644 --- a/packages/dapp/src/components/CampaignsDisplay/index.tsx +++ b/packages/dapp/src/components/CampaignsDisplay/index.tsx @@ -1,6 +1,5 @@ 'use client'; -import React from 'react'; import { CampaignDisplay } from './CampaignDisplay'; import { useCampaigns } from '@/hooks'; import { Spinner } from '@nextui-org/react'; diff --git a/packages/dapp/src/components/ConnectedProvider/index.tsx b/packages/dapp/src/components/ConnectedProvider/index.tsx index 3c97a8787..669309189 100644 --- a/packages/dapp/src/components/ConnectedProvider/index.tsx +++ b/packages/dapp/src/components/ConnectedProvider/index.tsx @@ -22,7 +22,7 @@ const ConnectedProvider = ({ children }: ConnectedProviderProps) => { return isConnected ? ( <>{children} ) : ( -
+

diff --git a/packages/dapp/src/components/Controlbar/FilterPopover/CredentialTypes.tsx b/packages/dapp/src/components/Controlbar/FilterPopover/CredentialTypes.tsx index 92c446347..7ce35b34b 100644 --- a/packages/dapp/src/components/Controlbar/FilterPopover/CredentialTypes.tsx +++ b/packages/dapp/src/components/Controlbar/FilterPopover/CredentialTypes.tsx @@ -49,7 +49,8 @@ export const CredentialTypes = () => { ); }} > - clear ({credentialTypes.filter((type) => type.selected).length}) + {t('clear')} ( + {credentialTypes.filter((type) => type.selected).length}) ) : (