-
Notifications
You must be signed in to change notification settings - Fork 32
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
Question about docs, how to validate WebApp.initDataUnsafe ? #21
Comments
Have you checked this yet? https://github.com/feathers-studio/telegraf-docs/tree/master/examples/mini-apps#validating-initdata |
I've provided the link to this document in my question |
Ah, you're right. Let me fix that. Give me a few minutes. |
This code works for me (it correctly handles user object in WebApp.initDataUnsafe)
|
Something has changed. This algo got broken during this week. |
I am using @twa-dev/sdk and when my TWA application starts I am getting WebApp.initDataUnsafe. I need to validate it according the docs. And I use code from the docs.
The main problem that my hashes never equal. In my WebApp.initDataUnsafe there is object user, and looks that it ignored during this check, it included in the checkstring as user=>[object Object] and probably thats the cause of the problem. But removing it doesn't solve the issue. So it needs to clarify the format of the object required for valudation.
The text was updated successfully, but these errors were encountered: