-
Notifications
You must be signed in to change notification settings - Fork 142
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
feat: Implement base work to enable wallet to receive OpenID4VCI #1214
feat: Implement base work to enable wallet to receive OpenID4VCI #1214
Conversation
Signed-off-by: Mostafa Gamal <moscd3@gmail.com>
Signed-off-by: Mostafa Gamal <moscd3@gmail.com>
Signed-off-by: Mostafa Gamal <moscd3@gmail.com>
Signed-off-by: Mostafa Gamal <moscd3@gmail.com>
Signed-off-by: Mostafa Gamal <moscd3@gmail.com>
Signed-off-by: Mostafa Gamal <moscd3@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple things
} | ||
} | ||
|
||
const openId4VcCredentialMetadataKey = '_paradym/openId4VcCredentialMetadata' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this introduce a dependency on Paradym?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but you are right, I should introduce a different key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
return true | ||
} | ||
|
||
if (url.includes('c_i=') || url.includes('oob=') || url.includes('oobUrl=') || url.includes('d_m=')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this not account for c_i
, d_m
, oob
, _oob
, and _url
? As it currently checks for those during scan handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I will take a closer look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MosCD3 , there was some work done to normalize and remove duplication on how URLs/Payloads are being parsed. We had some duplication and inconsistency between scanning QR Code vs open with deep link.
This is the main entry point:
export const connectFromScanOrDeepLink = async ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, yes this is the entry point and I need a way to differ open-id invitation from that of did-comm
And the way I did it is through the entry point you mentioned @cvarjao to minimize code impact. I added a parser and the way the parser works is scanning the invitation URL for known did-comm tags in line 66, so the answer @bryce-mcmath is yes we need this to return the type of invitation so that we route the invitation to the correct flow. If you have any other better and more clean flow to have the same result, please suggest it here and I will refactor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should just worry about "isOpenIdPresentationRequest()" and then add the logic to handle that, and fallback to what we already have, I would hope that in the future Credo can actually parse the invitation payload and make that decision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a nice plan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
Signed-off-by: Mostafa Gamal <moscd3@gmail.com>
} | ||
} else if (invitationData.type === 'openid-credential-offer') { | ||
//TODO: Impliment Navigation to display credential | ||
// const record = await receiveCredentialFromOpenId4VciOffer({ agent: agent, uri: uri }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should avoid silent errors/dead-end, if it is not supported/implemented yet, it should throw an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will throw an error. This should be the next PR after implementing the base work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
Signed-off-by: Mostafa Gamal <moscd3@gmail.com>
Quality Gate passedIssues Measures |
…nwallet-foundation#1214) Signed-off-by: Mostafa Gamal <moscd3@gmail.com> Signed-off-by: Ramy Zhang <ramyjzh@gmail.com>
Summary of Changes
TODO: Implement UI and Navigation
Pull Request Checklist
Tick all boxes below to demonstrate that you have completed the respective task. If the item does not apply to your this PR check it anyway to make it apparent that there's nothing to do.
Signed-off-by
line (we use the DCO GitHub app to enforce this);If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!
Pro Tip 🤓
PR template adapted from the Python attrs project.