Skip to content

Commit

Permalink
Add redirectUri and rename page (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jdu278 authored Aug 16, 2024
1 parent e14269d commit 92ed92f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
NUXT_PUBLIC_API_URL=http://localhost:8080
NUXT_PUBLIC_VERSION=dev
NUXT_PUBLIC_UI_URL
6 changes: 4 additions & 2 deletions components/PresentationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand All @@ -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
}
};
Expand All @@ -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: [
Expand Down
1 change: 1 addition & 0 deletions models/TransactionRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export type TransactionRequest = {
nonce: string;
presentation_definition: PresentationDefinition;
type: string;
wallet_response_redirect_uri_template: string;
response_mode: string;
}

Expand Down
1 change: 1 addition & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default defineNuxtConfig({
public: {
apiUrl: 'http://localhost:8080',
version: 'dev',
uiUrl: 'https://staging.wallet.tice.software'
},
}
})
File renamed without changes.

0 comments on commit 92ed92f

Please sign in to comment.