Skip to content

Commit

Permalink
chore: reenable redirect & refresh responseRedirectUri in existing RP…
Browse files Browse the repository at this point in the history
… sessions
  • Loading branch information
sanderPostma committed Oct 9, 2024
1 parent 0bcf8f1 commit b4e2f64
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
6 changes: 5 additions & 1 deletion packages/siopv2-oid4vp-rp-auth/src/agent/SIOPv2RP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ export class SIOPv2RP implements IAgentPlugin {
}
this.instances.set(instanceId, new RPInstance({ rpOpts, pexOpts: instanceOpts }))
}
return this.instances.get(instanceId)!
const rpInstance = this.instances.get(instanceId)!
if (responseRedirectURI) {
rpInstance.rpOptions.responseRedirectUri = responseRedirectURI
}
return rpInstance
}

async getRPOptions(context: IRequiredContext, opts: { definitionId?: string; responseRedirectURI?: string }): Promise<IRPOptions> {
Expand Down
4 changes: 1 addition & 3 deletions packages/siopv2-oid4vp-rp-auth/src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,9 @@ export async function createRPBuilder(args: {
builder.withPresentationDefinition({ definition }, PropertyTarget.REQUEST_OBJECT)
}

/*
FIXME: Re-enable
if (rpOpts.responseRedirectUri) {
builder.withResponseRedirectUri(rpOpts.responseRedirectUri)
}*/
}

//const key = resolution.key
//fixme: this has been removed in the new version of did-auth-siop
Expand Down
1 change: 0 additions & 1 deletion packages/ssi-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"dependencies": {
"@sd-jwt/decode": "^0.7.2",
"@sphereon/kmp-mdl-mdoc": "0.2.0-SNAPSHOT.22",
"@sphereon/ssi-sdk-ext.jwt-service": "0.24.1-unstable.134",
"debug": "^4.3.5",
"events": "^3.3.0",
"jwt-decode": "^3.1.2"
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b4e2f64

Please sign in to comment.