Deprecate social login, prettify some pages
This commit is contained in:
parent
a069fe7b6a
commit
96366ddcfa
|
@ -11,4 +11,5 @@ from .views import (
|
||||||
facebook,
|
facebook,
|
||||||
change_email,
|
change_email,
|
||||||
mfa,
|
mfa,
|
||||||
|
social,
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,15 +5,15 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block single_content %}
|
{% block single_content %}
|
||||||
{% if error %}
|
<div class="card">
|
||||||
<div class="text-danger text-center mb-4">{{ error }}</div>
|
<div class="card-body p-6">
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if incorrect_code %}
|
{% if incorrect_code %}
|
||||||
<div class="text-danger text-center h4">
|
<div class="text-danger text-center h4">
|
||||||
The link is incorrect. <br><br>
|
The link is incorrect. <br><br>
|
||||||
Please go to <a href="{{ url_for('dashboard.setting') }}"
|
</div>
|
||||||
class="btn btn-warning">settings</a>
|
<div class="text-center">
|
||||||
|
Please go to <a href="{{ url_for('dashboard.setting') }}">settings</a>
|
||||||
page to re-send confirmation email.
|
page to re-send confirmation email.
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -21,10 +21,13 @@
|
||||||
{% if expired_code %}
|
{% if expired_code %}
|
||||||
<div class="text-danger text-center h4">
|
<div class="text-danger text-center h4">
|
||||||
The link is already expired. <br><br>
|
The link is already expired. <br><br>
|
||||||
Please go to <a href="{{ url_for('dashboard.setting') }}"
|
</div>
|
||||||
class="btn btn-warning">settings</a>
|
<div class="text-center">
|
||||||
|
Please go to <a href="{{ url_for('dashboard.setting') }}">settings</a>
|
||||||
page to re-send confirmation email.
|
page to re-send confirmation email.
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -12,7 +12,7 @@
|
||||||
<form class="card" method="post">
|
<form class="card" method="post">
|
||||||
{{ form.csrf_token }}
|
{{ form.csrf_token }}
|
||||||
<div class="card-body p-6">
|
<div class="card-body p-6">
|
||||||
<div class="card-title text-center">Forgot password</div>
|
<div class="card-title">Forgot password</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-label">Email address</label>
|
<label class="form-label">Email address</label>
|
||||||
|
|
|
@ -1,24 +1,12 @@
|
||||||
{% extends "single.html" %}
|
{% extends "single.html" %}
|
||||||
|
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
Login
|
Login
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block head %}
|
|
||||||
<style>
|
|
||||||
.col-login {
|
|
||||||
max-width: 48rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block single_content %}
|
{% block single_content %}
|
||||||
<h1 class="h2 text-center">Welcome back!</h1>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
{% if show_resend_activation %}
|
{% if show_resend_activation %}
|
||||||
<div class="text-center text-muted small mb-4">
|
<div class="text-center text-muted small mb-4">
|
||||||
You haven't received the activation email?
|
You haven't received the activation email?
|
||||||
|
@ -26,10 +14,10 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="card">
|
<form class="card" method="post">
|
||||||
<form method="post">
|
|
||||||
{{ form.csrf_token }}
|
{{ form.csrf_token }}
|
||||||
<div class="card-body p-6">
|
<div class="card-body p-6">
|
||||||
|
<div class="card-title">Welcome back!</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-label">Email address</label>
|
<label class="form-label">Email address</label>
|
||||||
{{ form.email(class="form-control", type="email") }}
|
{{ form.email(class="form-control", type="email") }}
|
||||||
|
@ -53,50 +41,16 @@
|
||||||
<button type="submit" class="btn btn-primary btn-block">Log in</button>
|
<button type="submit" class="btn btn-primary btn-block">Log in</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
<div class="text-center text-muted mt-2">
|
<div class="text-center text-muted mt-2">
|
||||||
Don't have an account yet? <a href="{{ url_for('auth.register') }}">Sign up</a>
|
Don't have an account yet? <a href="{{ url_for('auth.register') }}">Sign up</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
<div class="text-center text-muted mt-5">
|
||||||
</form>
|
<a href="{{ url_for('auth.social') }}">Social Login</a> is now deprecated
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-body p-6">
|
|
||||||
<div class="card-title text-center">Or with social login
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a href="{{ url_for('auth.github_login', next=next_url) }}"
|
|
||||||
class="btn btn-block btn-social btn-github">
|
|
||||||
<i class="fa fa-github"></i> Sign in with Github
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a href="{{ url_for('auth.google_login', next=next_url) }}"
|
|
||||||
class="btn btn-block btn-social btn-google">
|
|
||||||
<i class="fa fa-google"></i> Sign in with Google
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a href="{{ url_for('auth.facebook_login', next=next_url) }}"
|
|
||||||
class="btn btn-block btn-social btn-facebook">
|
|
||||||
<i class="fa fa-facebook"></i> Sign in with Facebook
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="text-center p-3" style="font-size: 12px; font-weight: 300; margin: auto">
|
|
||||||
|
|
||||||
We do not use the Facebook/Google SDK to avoid their trackers. <br>
|
|
||||||
|
|
||||||
However when using a social login button, please keep in mind that this social network will <b>know</b> that
|
|
||||||
you are using SimpleLogin.
|
|
||||||
|
|
||||||
<span class="badge badge-warning">Warning</span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -9,8 +9,8 @@
|
||||||
{% block single_content %}
|
{% block single_content %}
|
||||||
<div class="bg-white p-6" style="margin: auto">
|
<div class="bg-white p-6" style="margin: auto">
|
||||||
|
|
||||||
<div>
|
<div class="mb-2">
|
||||||
Your account is protected with multi-factor authentication (MFA). <br>
|
Your account is protected with multi-factor authentication (MFA). <br><br>
|
||||||
To continue with the sign-in you need to provide the access code from your authenticator.
|
To continue with the sign-in you need to provide the access code from your authenticator.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -4,24 +4,12 @@
|
||||||
Register
|
Register
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
|
||||||
<style>
|
|
||||||
.col-login {
|
|
||||||
max-width: 48rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
|
|
||||||
{% block single_content %}
|
{% block single_content %}
|
||||||
<h1 class="h3 text-center">Create your SimpleLogin account now</h1>
|
<form class="card" method="post">
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="card">
|
|
||||||
<form method="post">
|
|
||||||
{{ form.csrf_token }}
|
{{ form.csrf_token }}
|
||||||
<div class="card-body p-6">
|
<div class="card-body p-6">
|
||||||
|
<div class="card-title">Create new account</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-label">Email address</label>
|
<label class="form-label">Email address</label>
|
||||||
{{ form.email(class="form-control", type="email") }}
|
{{ form.email(class="form-control", type="email") }}
|
||||||
|
@ -53,49 +41,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="text-center text-muted mb-6">
|
<div class="text-center text-muted mb-6">
|
||||||
Already have account? <a href="{{ url_for('auth.login') }}">Sign in</a>
|
Already have account? <a href="{{ url_for('auth.login') }}">Sign in</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-body p-6">
|
|
||||||
<div class="card-title text-center">Or with social login</div>
|
|
||||||
|
|
||||||
<a href="{{ url_for('auth.github_login', next=next_url) }}"
|
|
||||||
class="btn btn-block btn-social btn-github">
|
|
||||||
<i class="fa fa-github"></i> Sign up with Github
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a href="{{ url_for('auth.google_login', next=next_url) }}"
|
|
||||||
class="btn btn-block btn-social btn-google">
|
|
||||||
<i class="fa fa-google"></i> Sign up with Google
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a href="{{ url_for('auth.facebook_login', next=next_url) }}"
|
|
||||||
class="btn btn-block btn-social btn-facebook">
|
|
||||||
<i class="fa fa-facebook"></i> Sign up with Facebook
|
|
||||||
</a>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="text-center p-3" style="font-size: 12px; font-weight: 300; margin: auto">
|
|
||||||
|
|
||||||
We do not use the Facebook/Google SDK to avoid their trackers. <br>
|
|
||||||
|
|
||||||
However when using a social login button, please keep in mind that this social network will <b>know</b> that
|
|
||||||
you are using SimpleLogin.
|
|
||||||
|
|
||||||
<span class="badge badge-warning">Warning</span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -5,15 +5,18 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block single_content %}
|
{% block single_content %}
|
||||||
<div class="text-center bg-white p-5" style="max-width: 50rem">
|
<div class="card">
|
||||||
<h1>
|
<div class="card-body p-6 text-center">
|
||||||
|
|
||||||
|
<h1 class="h4">
|
||||||
An email to validate your email is on its way.
|
An email to validate your email is on its way.
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<h3>
|
<p>
|
||||||
Please check your inbox/spam folder.
|
Please check your inbox/spam folder.
|
||||||
</h3>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -0,0 +1,46 @@
|
||||||
|
{% extends "single.html" %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
Social Login
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block single_content %}
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body p-6">
|
||||||
|
<div class="card-title text-center">Social login
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a href="{{ url_for('auth.github_login', next=next_url) }}"
|
||||||
|
class="btn btn-block btn-social btn-github">
|
||||||
|
<i class="fa fa-github"></i> Sign in with Github
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="{{ url_for('auth.google_login', next=next_url) }}"
|
||||||
|
class="btn btn-block btn-social btn-google">
|
||||||
|
<i class="fa fa-google"></i> Sign in with Google
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="{{ url_for('auth.facebook_login', next=next_url) }}"
|
||||||
|
class="btn btn-block btn-social btn-facebook">
|
||||||
|
<i class="fa fa-facebook"></i> Sign in with Facebook
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="text-center p-3" style="font-size: 12px; font-weight: 300; margin: auto">
|
||||||
|
<span class="badge badge-warning">Warning</span>
|
||||||
|
Please note that social login is now <b>deprecated</b>. <br><br>
|
||||||
|
|
||||||
|
Though practical, these social providers do not respect your privacy and therefore we recommend using
|
||||||
|
email/password.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-center text-muted mt-2">
|
||||||
|
<a href="{{ url_for('auth.register') }}">Sign up</a> / <a href="{{ url_for('auth.login') }}">Login</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock %}
|
|
@ -0,0 +1,14 @@
|
||||||
|
from flask import render_template, redirect, url_for
|
||||||
|
from flask_login import current_user
|
||||||
|
|
||||||
|
from app.auth.base import auth_bp
|
||||||
|
from app.log import LOG
|
||||||
|
|
||||||
|
|
||||||
|
@auth_bp.route("/social", methods=["GET", "POST"])
|
||||||
|
def social():
|
||||||
|
if current_user.is_authenticated:
|
||||||
|
LOG.d("user is already authenticated, redirect to dashboard")
|
||||||
|
return redirect(url_for("dashboard.index"))
|
||||||
|
|
||||||
|
return render_template("auth/social.html")
|
|
@ -4,10 +4,10 @@
|
||||||
<div class="page-single">
|
<div class="page-single">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col mx-auto" style="max-width: 50rem">
|
<div class="col mx-auto" style="max-width: 24rem">
|
||||||
<div class="text-center mb-6">
|
<div class="text-center mb-6">
|
||||||
<a href="https://simplelogin.io">
|
<a href="https://simplelogin.io">
|
||||||
<img src="/static/logo.svg" style="background-color: transparent; height: 24px">
|
<img src="/static/logo.svg" style="background-color: transparent; height: 20px">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue