Example #1
0
 def get(cls):
     """
     In order to begin the authorization flow, we need to send to GitHub that we want to authorize. We do that by
     sending the user over to the GitHub Authorization page, along with our details. Then, GitHub will see those
     details and send the user over to the login page (or to their "Do you want to authorize this app" page). All
     we have to do here is to send the user to GitHub with our details, and the github client that we created can
     do that with the github.authorize() method. It takes a callback, which is the important point here and states
     where do we want to go once the user has been authorized. This will be the url that we originally put in to our
     GitHub OAuth app on their site.
     """
     #  return github.authorize(callback="http://localhost:5000/login/github/authorized")
     return github.authorize(
         url_for("github.authorize",
                 external=True))  # github.authorize is name of endpoint.
Example #2
0
 def get(cls):
     return github.authorize(url_for("github.authorize", external=True))
Example #3
0
 def get(cls):
     return  github.authorize(callback="http://localhost:5000/login/github/authorized")
Example #4
0
def github_login():
    resp = github.authorize(url_for("authorized",_external=True))
    
    return resp
Example #5
0
 def get(cls):
     """
     Redirects user to login. If already in, redirects to authorize endpoint
     """
     return github.authorize(url_for("github.authorize", _external=True))
Example #6
0
 def get(cls):
     return github.authorize(url_for('github.authorize', _external=True))
 def get(cls):
     """send user to authorization page"""
     return github.authorize(url_for("github.authorize", _external=True)) # external beacuse we build full url
Example #8
0
 def get(cls):
     return github.authorize(callback=url_for("github.authorize", _external=True))
Example #9
0
 def get(cls):
     # where do we wanna go once the user has been authorised
     # github.authorize is name of our endpoint, in app.py
     # _external=True means build the full URL like, http://localhost:5000/login/github/authorized
     return github.authorize(url_for("github.authorize", _external=True))
 def get(cls):
     # callback='http://localhost:5000/login/github/authorized'
     return github.authorize(
         callback=url_for('github.authorized', _external=True))
Example #11
0
 def get(cls):
     # where we want to go after user has been authorized
     # return github.authorize(callback="http://localhost:5000/login/github/authorized")
     return github.authorize(url_for("github.authorize", _external=True))