Merge 2d9d2bec66
into e591211b57
This commit is contained in:
commit
1d25c54cca
|
@ -50,6 +50,7 @@
|
|||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<br/><button name="clearToken" type="button" class="btn btn-default" onclick="window.location.href='/clear'">Clear Tokens</button>
|
||||
</form>
|
||||
</div>
|
||||
{% if error %}
|
||||
|
|
|
@ -36,6 +36,7 @@ from sqlalchemy.exc import IntegrityError, InvalidRequestError, OperationalError
|
|||
from sqlalchemy.sql.expression import text, func, false, not_, and_, or_
|
||||
from sqlalchemy.orm.attributes import flag_modified
|
||||
from sqlalchemy.sql.functions import coalesce
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from werkzeug.datastructures import Headers
|
||||
from werkzeug.security import generate_password_hash, check_password_hash
|
||||
|
@ -1453,6 +1454,14 @@ def logout():
|
|||
log.debug("User logged out")
|
||||
return redirect(url_for('web.login'))
|
||||
|
||||
@web.route('/clear')
|
||||
def clear():
|
||||
o = urlparse(request.base_url)
|
||||
host = o.hostname
|
||||
response = make_response(redirect('/login'))
|
||||
response.set_cookie('session', '', expires=0, httponly=True, domain=host)
|
||||
response.set_cookie('remember_token', '', expires=0, httponly=True,domain=host)
|
||||
return response
|
||||
|
||||
# ################################### Users own configuration #########################################################
|
||||
def change_profile(kobo_support, local_oauth_check, oauth_status, translations, languages):
|
||||
|
|
Loading…
Reference in New Issue