Closed MosCD3 closed 1 month ago
Can you track down where atob is used? It's used for base64 encoding/decoding but not available in your environment it seems.
Which RN version are you on, and are you using hermes?
It is used in @sphereon/did-auth-siop
specifically to get the authorization from uri or JWT, the expectation comes from this function in credo-oidc
const verifiedAuthorizationRequest = await openidProvider.verifyAuthorizationRequest(requestJwtOrUri)
I believe RN doesn't have a built in decoding for base64 but its working in paradigm with no issues Am I missing a polypfill or something
Bifold is at RN 0.72.5 And we are using latest credo 0.5.11
Okay and are you using hermes? Might be the react native version / hermes.
Is the sphereon lib using atob method directly? Or through a dependency?
I can see that its using
import { jwtDecode } from 'jwt-decode';
so through a dependency I believe
And yes we are using hermes
@TimoGlastra I solved it :D I added base64 polypill and defined it to be global in index.js and tested. The presentation request came in and was decoded successfully
Hi team I am trying to implement OpenID4VP in Bifold after we successfully implemented the credential issuance and acceptance flow. I am using such blockchain issuer now as means of testing issuance and verification and Paradym wallet as my resource for implementation. I am getting this error when trying to resolve presentation request
Invalid token specified: invalid base64 for part #1 (Property 'atob' doesn't exist)
That seems coming fromagent.modules.openId4VcHolder.resolveSiopAuthorizationRequest(requestUri)
=> const verifiedAuthorizationRequest = await openidProvider.verifyAuthorizationRequest(requestJwtOrUri)I tried both scenarios, passing the uri => failed with same error extracting certificate from auth request => adding to agent trusted certs => passing Jwt : also fails with same error
In paradym wallet, it works fine I made sure those sphereon libraries are installed though