This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
CORS error: browser SDK adds x-sdk-version header and browser blocks request to API server #168
Labels
bug
Something isn't working
I do passwordless login using
AffinidiWallet.initiateSignInPasswordless
using"@affinidi/wallet-browser-sdk": "^6.0.0-beta.20"
and prod environment. After entering confirmation code sent by AWS Cognito, SDK generate DID and sends request to:https://affinity-registry.prod.affinity-project.org/api/v1/did/anchor-did
However this request is blocked by browser because Affinidi's API server doesn't allow custom 'x-sdk-version' (it allows only
Access-Control-Allow-Headers: Content-Type,Authorization,Api-Key
). So request is blocked with following error:Then when you try to login again with same email, SDK send request to:
https://affinity-wallet-backend.prod.affinity-project.org/api/v1/keys/readMyKey
But because of previous problem, user is in broken state and this request also fails with "There is no key for this user." error message:
The text was updated successfully, but these errors were encountered: