diff --git a/.env.example b/.env.example index 461760b..54fd8d5 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,3 @@ NUXT_PUBLIC_API_URL=http://localhost:8080 NUXT_PUBLIC_VERSION=dev +NUXT_PUBLIC_UI_URL diff --git a/components/PresentationForm.vue b/components/PresentationForm.vue index b0ffa76..492eba7 100644 --- a/components/PresentationForm.vue +++ b/components/PresentationForm.vue @@ -69,6 +69,7 @@ const sessionStore = useSessionStore(); const runtimeConfig = useRuntimeConfig() const baseUrl = runtimeConfig.public.apiUrl +const redirectUrl = `${runtimeConfig.public.uiUrl}/wallet-redirect#response_code={RESPONSE_CODE}` const nonce = crypto.randomUUID() const dataList = computed(() => { @@ -88,11 +89,11 @@ const postData = async () => { ] const format: Format = formType.value === 'mDoc' ? { - mso_mdoc: { + "mso_mdoc": { alg } } : { - vc_sd_jwt: { + "vc+sd-jwt": { alg } }; @@ -119,6 +120,7 @@ const postData = async () => { nonce: nonce, response_mode: 'direct_post', type: 'vp_token', + wallet_response_redirect_uri_template: redirectUrl, presentation_definition: { id: crypto.randomUUID(), input_descriptors: [ diff --git a/models/TransactionRequest.ts b/models/TransactionRequest.ts index b754a97..d6c31a0 100644 --- a/models/TransactionRequest.ts +++ b/models/TransactionRequest.ts @@ -2,6 +2,7 @@ export type TransactionRequest = { nonce: string; presentation_definition: PresentationDefinition; type: string; + wallet_response_redirect_uri_template: string; response_mode: string; } diff --git a/nuxt.config.ts b/nuxt.config.ts index cf43643..a9d9573 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -8,6 +8,7 @@ export default defineNuxtConfig({ public: { apiUrl: 'http://localhost:8080', version: 'dev', + uiUrl: 'https://staging.wallet.tice.software' }, } }) \ No newline at end of file diff --git a/pages/get-wallet-code.vue b/pages/wallet-redirect.vue similarity index 100% rename from pages/get-wallet-code.vue rename to pages/wallet-redirect.vue