Hide deprecated social login if not used

This commit is contained in:
Fabio Widmer 2020-08-16 12:57:12 +02:00
parent fbb17b1f57
commit 28dbafe1f7
No known key found for this signature in database
GPG Key ID: B1EC11D925800D35
2 changed files with 9 additions and 1 deletions

View File

@ -49,8 +49,10 @@
Don't have an account yet? <a href="{{ url_for('auth.register') }}">Sign up</a>
</div>
{% if (GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET) or (GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET) or (FACEBOOK_CLIENT_ID and FACEBOOK_CLIENT_SECRET) %}
<div class="text-center text-muted mt-5">
<a href="{{ url_for('auth.social') }}">Social Login</a> is now deprecated
</div>
{% endif %}
{% endblock %}

View File

@ -12,20 +12,26 @@
<div class="card-title text-center">Social login
</div>
{% if GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET %}
<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
<i class="fa fa-github"></i> Sign in with GitHub
</a>
{% endif %}
{% if GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET %}
<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>
{% endif %}
{% if FACEBOOK_CLIENT_ID and FACEBOOK_CLIENT_SECRET %}
<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>
{% endif %}
</div>
<div class="text-center p-3" style="font-size: 12px; font-weight: 300; margin: auto">
<span class="badge badge-warning">Warning</span>