Comments (2)
The URI value I am using is generated when a credential option is selected and a QR code is generated. I simply copy the URL and insert it into the code. The URL always looks like this: openid-credential-offer://?credential_offer=%7B%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22wzUetZE7ytnS8n4ZwbLHwG%22%2C%22user_pin_required%22%3Afalse%7D%7D%2C%22credentials%22%3A%5B%22GuestCredential%22%5D%2C%22credential_issuer%22%3A%22https%3A%2F%2Fssi.sphereon.com%2Fpf3%22%7D
from oid4vc-demo.
Hi @ismapolis
I have been looking into your issue. You can see your code incorporated into a test here: https://github.com/Sphereon-Opensource/OID4VCI/blob/9f4eca6130a045e20999506c1ded96abddcd9f41/packages/client/lib/__tests__/SphereonE2E.spec.test.ts#L119
The above code also automatically creates a new offer, so you do not have to copy paste anything ;)
First of all probably good for you to know for next time is that you can include the following line to get more information about any errors and/or payloads:
debug.enable('*')
// or debug.enable('sphereon:*')
Then you would get this response payload on your console:
sphereon:openid4vci:http error status: 500, body:
sphereon:openid4vci:http {"error":"invalid_request","error_description":"invalid_jwt: JWT not valid yet (issued in the future) iat: 1699049651145"}
The issue is that in your code you are using +new Date()
for the issuedAt value, but that should be devided by 1000 (seconds vs milliseconds) for JWTs. If you just call it with setIssuedAt()
it will automatically use current date
After fixing that some small other errors occured which had to do with some values in the JWT sign callback missing. You need to provide a kid
header as well as set the correct typ
('openid4vci-proof+jwt')
from oid4vc-demo.
Related Issues (14)
- Problem with local dev config for demo issuer front-end HOT 4
- Unable to resolve DID document for did:web:dbc2023.test4.sphereon.com HOT 1
- Missing logo image on secret and classified pages
- Demo issuer fails with gateway timeout HOT 2
- resolver_error: Unable to resolve DID document for sphereon:ssi-wallet: invalidDid, HOT 2
- Bug: Module not found HOT 5
- Question about some SIOPv2 specification details HOT 3
- Question about the issuer demo HOT 4
- OID4VP issue HOT 3
- Errors in VC Issuance with Wallet (SIOP) & VC Presentation HOT 1
- Get Issued credentials HOT 1
- VC with status HOT 3
- Errors in SIOP flow using Sphereom Wallet
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oid4vc-demo.