Skip to content
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(oob): support fetching shortened invitation urls #840

Merged
merged 50 commits into from
Jul 14, 2022

Conversation

KolbyRKunz
Copy link
Contributor

@KolbyRKunz KolbyRKunz commented Jun 8, 2022

Adds support for attempting to parse a URL as a shortened URL after failing to parse a URL normally, This follows the most recent changes to the out-of-band rfc with the known caveats involved.

TheTreek and others added 30 commits April 7, 2022 15:33
Signed-off-by: Patrick Kenyon <[email protected]>
Signed-off-by: Patrick Kenyon <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
@TimoGlastra
Copy link
Contributor

I've added this to the Agenda for the WG call today, would be great if one of you @KolbyRKunz @JamesKEbert could attend!

@KolbyRKunz
Copy link
Contributor Author

KolbyRKunz commented Jul 8, 2022

After testing the trinsic shortener we found that if short url leads to a deep link fetch does not automatically follow the redirect and the workflow is at intended in the RFC, we added a statement that checks whether we followed the redirect or not and grabs the encrypted URL according to redirect status. This was a small change but also has us follow the RFC more closely.

Additionally we have noted that the trinsic shortener doe not follow the rfc in that if you supply the content-type as application/json we DO NOT get the invitation as json back from the fetch.

@TimoGlastra

Copy link
Contributor

@TimoGlastra TimoGlastra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Left some nits on the naming / structure of the code, but the contents look good and look forward to merging this PR!

packages/core/src/utils/__tests__/shortenedUrl.test.ts Outdated Show resolved Hide resolved
packages/core/src/utils/__tests__/shortenedUrl.test.ts Outdated Show resolved Hide resolved
packages/core/src/utils/parseInvitation.ts Outdated Show resolved Hide resolved
packages/core/src/utils/parseInvitation.ts Outdated Show resolved Hide resolved
packages/core/src/utils/parseInvitation.ts Outdated Show resolved Hide resolved
packages/core/src/utils/parseInvitation.ts Outdated Show resolved Hide resolved
packages/core/src/utils/parseInvitation.ts Show resolved Hide resolved
…ated receiveINvitationFromUrl to use the short url compatiable method

Signed-off-by: KolbyRKunz <[email protected]>
Signed-off-by: KolbyRKunz <[email protected]>
@KolbyRKunz
Copy link
Contributor Author

KolbyRKunz commented Jul 13, 2022

@TimoGlastra The receiveInvitationFromUrl has been updated and the node version changed to greater than ^2.0. If there is not anything else I think this is ready to be merged.

@TimoGlastra TimoGlastra dismissed berendsliedrecht’s stale review July 14, 2022 08:00

comments have been resolved

@TimoGlastra TimoGlastra enabled auto-merge (squash) July 14, 2022 16:09
@TimoGlastra TimoGlastra merged commit 60ee0e5 into openwallet-foundation:main Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants