Logo
Explore Help
Sign In
darkhelm/notifications-admin
1
0
Fork 0
You've already forked notifications-admin
mirror of https://github.com/GSA/notifications-admin.git synced 2026-09-02 17:48:50 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
f93ef2eb3db2f9f4fb8ffac1fa33274c46023222
notifications-admin/app/main/views/sign_out.py

17 lines
268 B
Python
Raw Normal View History

Record login including remembered user login events to the api based of flask login signals.
2016-04-27 16:39:17 +01:00
from flask import (
redirect,
url_for,
session
)
Send an email to the user when they change email address This PR changes the flow to change an email address. Once the user enter their password, they are told "Check your email". An email has been sent to them containing a link to notify which contains an encrypted token. The encrypted token contains the user id and new email address. Once the link is clicked the user's email address is updated to the new email address. They are redirected to the /user-profile page. Also in this commit is an update from flask.ext.login to flask_login.
2016-10-13 17:05:37 +01:00
from flask_login import logout_user
Logout functionality and test added.
2016-01-06 16:40:38 +00:00
from app.main import main
@main.route('/sign-out', methods=(['GET']))
def sign_out():
Record login including remembered user login events to the api based of flask login signals.
2016-04-27 16:39:17 +01:00
session.clear()
Believe it or not this broke functional tests
2016-04-27 18:00:46 +01:00
logout_user()
Redirect to homepage after signout
2016-06-21 09:40:04 +01:00
return redirect(url_for('main.index'))
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.0 Page: 1311ms Template: 49ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API