fix domain ban checking and remove app data
This commit is contained in:
parent
18f3803856
commit
a28aca218a
|
@ -4,7 +4,7 @@ import random
|
||||||
from aiohttp_jinja2 import render_template as render
|
from aiohttp_jinja2 import render_template as render
|
||||||
from urllib.parse import quote_plus, unquote_plus
|
from urllib.parse import quote_plus, unquote_plus
|
||||||
|
|
||||||
from .database import pawsdb, trans, query, where, keys
|
from .database import pawsdb, trans, query, where, keys, ban_check
|
||||||
from .functions import error, fed_domain
|
from .functions import error, fed_domain
|
||||||
from .oauth import create_app, login
|
from .oauth import create_app, login
|
||||||
from .config import MASTOCONFIG
|
from .config import MASTOCONFIG
|
||||||
|
@ -72,9 +72,7 @@ async def get_auth(request):
|
||||||
instance = fed_domain(userinfo['username'], user['domain'])
|
instance = fed_domain(userinfo['username'], user['domain'])
|
||||||
|
|
||||||
with trans(pawsdb.users) as tr:
|
with trans(pawsdb.users) as tr:
|
||||||
tr.update({'handle': userinfo['username'], 'instance': instance, 'token': token}, where('handle') == numid)
|
tr.update({'handle': userinfo['username'], 'instance': instance, 'token': token, 'appid': None, 'appsecret': None}, where('handle') == numid)
|
||||||
|
|
||||||
print(user)
|
|
||||||
|
|
||||||
response = aiohttp.web.HTTPFound(redir)
|
response = aiohttp.web.HTTPFound(redir)
|
||||||
response.set_cookie('paws_token', token, max_age=60*60*24*14)
|
response.set_cookie('paws_token', token, max_age=60*60*24*14)
|
||||||
|
|
Loading…
Reference in a new issue