Skip to content

Commit fcba340

Browse files
voiduinJonathanHuot
authored andcommitted
Update index.rst
Small fixes: - Delete not used import url_for - Add flask app - Add secret_key for flask session
1 parent 6925d4c commit fcba340

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/index.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,18 @@ approximately like this:
2222
2323
from requests_oauthlib import OAuth2Session
2424
25-
from flask import Flask, request, redirect, session, url_for
25+
from flask import Flask, request, redirect, session
2626
from flask.json import jsonify
2727
2828
# This information is obtained upon registration of a new GitHub
2929
client_id = "<your client key>"
3030
client_secret = "<your client secret>"
3131
authorization_base_url = 'https://github.com/login/oauth/authorize'
3232
token_url = 'https://github.com/login/oauth/access_token'
33+
secret_key = "<secret_key for use flask session>"
34+
35+
app = Flask(__name__)
36+
app.config['SECRET_KEY'] = secret_key
3337
3438
@app.route("/login")
3539
def login():

0 commit comments

Comments
 (0)