Skip to content

Add redirectUri and rename page #4

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

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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.