fix secret key
This commit is contained in:
parent
cfb7258d24
commit
4d68d3d457
2 changed files with 7 additions and 4 deletions
|
@ -10,6 +10,7 @@ SQLALCHEMY_DATABASE_URI="postgres://wot:wot@192.168.1.47/wot"
|
|||
OPENID_FS_STORE_PATH="tmp"
|
||||
|
||||
WG_REDIRECT_URL="http://wot.anzhiganov.com/token"
|
||||
#WG_REDIRECT_URL="http://localhost:5000/token"
|
||||
WG_APPLICATION_ID="502910c1c785c3c7ca2e83c9e89bde02"
|
||||
# WG_OPENID_URL=https://eu.wargaming.net/id/openid/
|
||||
WG_OPENID_URL="https://wargaming.net/id/openid/"
|
||||
|
|
|
@ -102,9 +102,11 @@ def logout():
|
|||
def token():
|
||||
print request.args
|
||||
print request.form
|
||||
print session
|
||||
|
||||
#if 'openid' not in session or 'user' in session:
|
||||
# return redirect(url_for('pages_home.index'))
|
||||
|
||||
if 'openid' not in session or 'user' in session:
|
||||
return redirect(url_for('pages_home.index'))
|
||||
# ImmutableMultiDict([('status', u'ok'), ('access_token', u'a4d0a13df7c733102fbf6cd650794c6d047e91aa'), ('nickname', u'CrazyPants1999'), ('account_id', u'69552613'), ('', u'1505047809')])
|
||||
if request.args.get('status') == 'ok' and request.args.get('access_token'):
|
||||
token = UserWotTokens.query.filter_by(user=session['user'])
|
||||
|
@ -177,8 +179,8 @@ def create_or_login(resp):
|
|||
|
||||
# flash(u'Successfully signed in')
|
||||
g.user = user
|
||||
print session
|
||||
if not session['token']:
|
||||
print('session: {}'.format(session))
|
||||
if session['token'] is None:
|
||||
print('not token')
|
||||
return redirect(url_for('pages_home.token'))
|
||||
return redirect(oid.get_next_url())
|
||||
|
|
Reference in a new issue