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

After ten minutes, redirect the claim page to a 'Your link has expired' page #5

Closed
jchartrand opened this issue Jan 22, 2024 · 2 comments

Comments

@jchartrand
Copy link
Contributor

When the LEF claim page opens, it immediately makes an AJAX call to a payload endpoint (/get-credential-links) to get the deeplink for the LCW. Payload in turn makes a call to the DCC transaction manager, which sets up the exchange endpoint and returns the deeplink to payload, which then returns it to the collection page. The collection page then turns the deeplink into the QR code that it displays.

The exchange endpoint is by default only set to live for 10 minutes. So if you've opened up the claim page, you've got ten minutes to collect the credential after which the deep link expires. If you try to scan the QR at this point the wallet opens but you get a cryptic error:

image

The ten minute expiration is intentional to handle the case where someone maybe left the claim page open. We don't want someone else to come along and be able scan the QR and collect the credential.

At the moment, though, you can just refresh the claim page to get a fresh QR, because the authentication JWT is still available to the page.

So, we want javascript in the claim page that will redirect after ten minutes to a different page that doesn't have the JWT, and shows a message like 'Your credential link has expired. If you haven't yet collected your credential, please try again using the link that was sent to you.'

@kayaelle
Copy link
Member

This is complete. @jchartrand - could you link the PR to this issue and then close it? Thanks

@jchartrand
Copy link
Contributor Author

Fixed with commit 03428e9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done (Deployed)
Development

No branches or pull requests

2 participants