Skip to content

Commit

Permalink
feat: Support http(s) urls
Browse files Browse the repository at this point in the history
  • Loading branch information
zoemaas committed May 7, 2024
1 parent 00810ff commit b3cc812
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/oid4vci-holder/src/link-handler/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ export class OID4VCIHolderLinkHandler extends LinkHandlerAdapter {
}

async handle(url: string | URL): Promise<void> {
// FIXME CWALL-199 add support for URL's
const uri = new URL(url).toString().replace(new RegExp('.*\\?'), 'openid-credential-offer://?')
const uri = new URL(url).toString()
const offerData = convertURIToJsonObject(uri) as Record<string, unknown>
const hasCode = 'code' in offerData && !!offerData.code && !('issuer' in offerData)
const code = hasCode ? (offerData.code as string) : undefined
Expand Down

0 comments on commit b3cc812

Please sign in to comment.