Closed juliancwirko closed 1 year ago
hello!
the issue is most likely related to the server-side verifications performed.
the backend that uses the native auth server must specify in the acceptedOrigins array the https://elvenjs.netlify.app
origin
furthermore, the requests must always be performed from the elvenjs.netlify.app domain, so that the origin header in the request matches the origin in the native auth token
Hi, I think the origin is proper. I probably need help understanding something, how https://utils.multiversx.com/auth?network=devnet verifies Access tokens from other services? Does it check origins? Because some of my Access tokens generated with the same process are validated correctly there.
The first image, when using the extension and validation on utils service (but the same is with the Node-based simple app, where I paste the access token):
The second, done after the first one on the same app, but signing with Web wallet (the same is with a simple Node verification app, where I'm pasting the access token):
I've done more tests on an unrelated project with the same implementation, and all work there, so it must be a bug somewhere on my side. I'll close the issue and try to debug it more. Thanks.
When I used the mx-sdk-js-native-auth-client library, I observed that the Access token couldn't be verified using mx-sdk-js-native-auth-server library and also https://utils.multiversx.com/auth service when signing using extension provider.
Interestingly, the same code with the web wallet and xPortal generates a valid Access token that can be verified using mx-sdk-js-native-auth-server library and also utils service.
Are there any known problems related to that?
The case can be tested here: https://elvenjs.netlify.app/. The Access token is saved in localstorage under
elvenjs_state
I use it like:
and then: