GithubHelp home page GithubHelp logo

mantlecurve / flask-telegram-login Goto Github PK

View Code? Open in Web Editor NEW
21.0 4.0 6.0 10 KB

A simple demonstration of flask login using telegram

License: MIT License

Python 100.00%
telegram telegram-login flask python3 authentication

flask-telegram-login's Introduction

Flask Telegram Login

This is a simple demonstration of flask login using Telegram. Further info on this can be found at https://core.telegram.org/widgets/login

Getting bot token

  • Chat with @BotFather in Telegram to create a new bot
  • Use /setdomain command to set the domain
  • update the templates/index.html file to add relevant details

flask-telegram-login's People

Contributors

mantlecurve avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flask-telegram-login's Issues

Absence of user last_name causes TypeError

I was getting TypeError when I tried to login. I figured out after putting some debug code that the "last_name" in

Keys have the following:

['auth_date', 'first_name', 'id', 'last_name', 'username']

When in comes to last_name in the iteration in for key in keys:it fails.

    string_arr.append(key+'='+data[key])
TypeError: can only concatenate str (not "NoneType") to str

string_arr.append(key+'='+data[key])

I worked around it by putting a last name and it logged successfully.

hash key is not correct when some returned parameters are missing

Hello there,

When some request.args.get() is missing (in my case, no "photo_url") and None is returned as the default value, key + '=' + data[key] would result in error since data[key] is None. I have tried checking for None value, to skip the whole key + '=' + data[key] line, or make it to be key + '=' + '', both give a wrong hash.

May you please help take a look on this?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.