Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialolegovich7
6,605 PointsFlask & Telegram auth
Hi there! I am building a web app with login via telegram (it's a messenger). And i'm struggling with getting it to work. Authentication should be like:
- User enters his id/username
- When they submit form my bot sends random number to their telegram account and they get redirected to the second form
- User enters number they get and gets redirected to the /login route where app checks if numbers match
In the last step when the user gets redirected to the /login route, I need to pass both the number user entered and the correct one to the /login route. How do i do that properly? Now i pass user's number in a post request and the correct number's hash in the post request as a hidden value in a form, and then check it. I recon it's not safe.