From ba447113287b64f6b2b5d01d4b82b69e4e58d6d5 Mon Sep 17 00:00:00 2001 From: deflax Date: Sun, 7 Apr 2024 23:44:50 +0300 Subject: [PATCH] redirect to panel.dashboard with social login --- src/forest/auth/routes.py | 4 +++- src/forest/templates/auth/email/confirm.html | 2 -- src/forest/templates/auth/email/confirm.txt | 6 ------ 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/forest/auth/routes.py b/src/forest/auth/routes.py index d5f7ea4..cea3d5b 100644 --- a/src/forest/auth/routes.py +++ b/src/forest/auth/routes.py @@ -162,7 +162,9 @@ def oauth2_callback(provider): # log the user in login_user(user) - return redirect(url_for('main.index')) + #return redirect(url_for('main.index')) + flash('Last Login: {}'.format(user.last_seen.strftime("%a %d %B %Y %H:%M"))) + return redirect(request.args.get('next') or url_for('panel.dashboard')) @auth.route('/login', methods=['GET', 'POST']) def login(): diff --git a/src/forest/templates/auth/email/confirm.html b/src/forest/templates/auth/email/confirm.html index 756412a..19a3776 100644 --- a/src/forest/templates/auth/email/confirm.html +++ b/src/forest/templates/auth/email/confirm.html @@ -2,6 +2,4 @@

To confirm your account please click here.

Alternatively, you can paste the following link in your browser's address bar:

{{ url_for('auth.confirm', token=token, _external=True) }}

-

Sincerely,

-

Datapoint.bg

Note: replies to this email address are not monitored.

diff --git a/src/forest/templates/auth/email/confirm.txt b/src/forest/templates/auth/email/confirm.txt index c8578ea..fbe41b5 100644 --- a/src/forest/templates/auth/email/confirm.txt +++ b/src/forest/templates/auth/email/confirm.txt @@ -1,13 +1,7 @@ Dear Customer, -Welcome to Datapoint! - To confirm your account please click on the following link: {{ url_for('auth.confirm', token=token, _external=True) }} -Sincerely, - -Datapoint.bg - Note: replies to this email address are not monitored.