Enable Google OAuth2 logins

This commit is contained in:
Michael Hall 2018-01-22 12:39:45 -05:00
parent 6022eb15d5
commit 26357e6b41
2 changed files with 5 additions and 2 deletions

View file

@ -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

View file

@ -6,11 +6,12 @@
<h4>Login</h4>
<!--
<a class="btn btn-primary" href="{% url 'social:begin' 'google-oauth2' %}">Google</a>&nbsp; &nbsp;
<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>&nbsp; &nbsp;
-->
<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 %}