Replies: 1 comment
-
|
Oh wow, kinda embarrassing... I realized, that I totally forgot, that the API is probably supposed to respond to the initial request with a Set-Cookie header, containing the API's own auth token (with expiry, of a day or two, right?)... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Telegram team, love you <3
I can't get my head around why does Telegram pass MiniApp
initDatato URL hash (#) rather than just add it to URL params?This requires developers to perform an initial API request using JS to authenticate the user (after page is loaded, on any page)...
If the initData was added to params, we could authenticate the user on the first HTTP request, or if it fails - just respond with 403.
Yes you need to do some params merging, but isn't it a matter of checking if MiniApp URL has
?in it or not, then add initData with either?or&at the front?Beta Was this translation helpful? Give feedback.
All reactions