@app.route('/signup')
def signup():
    resp = github.get('/user')
    if (not github.authorized):
        return redirect(url_for('github.login'))
    print(resp)
    assert resp.ok
    user = User.query.filter_by(username=resp.json()['login']).first()
    username = resp.json()['login']
    github_hash = user.github_hash
    return redirect(f'/docs?username={username}&token={github_hash}')
@app.route('/signup')
def signup():
    resp = github.get('/user')
    if (not github.authorized):
        return redirect(url_for('github.login'))
    print(resp)
    assert resp.ok
    user = User.query.filter_by(username=resp.json()['login']).first()
    username = resp.json()['login']
    github_hash = user.github_hash
    return redirect(f'/docs?username={username}&token={github_hash}')