Enable Google OAuth2 logins
This commit is contained in:
parent
6022eb15d5
commit
26357e6b41
2 changed files with 5 additions and 2 deletions
|
@ -151,6 +151,8 @@ GOOGLE_ANALYTICS_ID=None
|
|||
SETTINGS_EXPORT = [
|
||||
'DEBUG',
|
||||
'GOOGLE_ANALYTICS_ID',
|
||||
'SOCIAL_AUTH_GITHUB_KEY',
|
||||
'SOCIAL_AUTH_GOOGLE_OAUTH2_KEY',
|
||||
]
|
||||
|
||||
# Keep this at the end of settings.py to allow overriding settings in local deployments
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
|
||||
<h4>Login</h4>
|
||||
<!--
|
||||
<a class="btn btn-primary" href="{% url 'social:begin' 'google-oauth2' %}">Google</a>
|
||||
<a class="btn btn-primary" href="{% url 'social:begin' 'facebook' %}">Facebook</a><br/><br/>
|
||||
<a class="btn btn-primary" href="{% url 'social:begin' 'twitter' %}">Twitter</a>
|
||||
-->
|
||||
<a class="btn btn-primary" href="{% url 'social:begin' 'github' %}">GitHub</a><br/>
|
||||
{% if settings.SOCIAL_AUTH_GOOGLE_OAUTH2_KEY %}<span><a class="btn btn-primary" href="{% url 'social:begin' 'google-oauth2' %}">Google</a></span>{% endif %}
|
||||
{% if settings.SOCIAL_AUTH_GITHUB_KEY %}<span><a class="btn btn-primary" href="{% url 'social:begin' 'github' %}">GitHub</a></span>{% endif %}
|
||||
{% if settings.DEBUG %}<span><a class="btn btn-primary" href="{% url 'admin:login' %}">Local</a></span>{% endif %}
|
||||
<br>
|
||||
</center>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue