add login via google

This commit is contained in:
Kayn Ty 2018-04-30 15:55:47 +02:00
parent 9f061cf458
commit 6fbce9694f
3 changed files with 15 additions and 7 deletions

View File

@ -9,6 +9,10 @@
<i class="fa fa-{{ "twitter" }}"></i> <i class="fa fa-{{ "twitter" }}"></i>
{{ "twitter" | trans({}, 'HWIOAuthBundle') }} {{ "twitter" | trans({}, 'HWIOAuthBundle') }}
</a> </a>
<a class="btn btn-default btn-{{ "google" }}" href="{{ hwi_oauth_login_url("google") }}">
<i class="fa fa-{{ "google" }}"></i>
{{ "google" | trans({}, 'HWIOAuthBundle') }}
</a>
{#{% for owner in hwi_oauth_resource_owners() %}#} {#{% for owner in hwi_oauth_resource_owners() %}#}
{#<a class="btn btn-default btn-block btn-{{ owner }}" href="{{ hwi_oauth_login_url(owner) }}">#} {#<a class="btn btn-default btn-block btn-{{ owner }}" href="{{ hwi_oauth_login_url(owner) }}">#}

View File

@ -15,8 +15,11 @@
{% endblock %} {% endblock %}
<div id="bodyland"> <div id="bodyland">
{% include 'default/header.html.twig' %} {% include 'default/header.html.twig' %}
<div class="container">
{% block body %} {% block body %}
{% endblock %} {% endblock %}
</div>
{% include 'default/footer.html.twig' %} {% include 'default/footer.html.twig' %}
</div> </div>
{% block javascripts %} {% block javascripts %}

View File

@ -112,15 +112,16 @@
{% else %} {% else %}
{#<a class="btn btn-default btn-block btn-twitter" href="{{ hwi_oauth_login_url('disqus') }}">#}
{#<i class="fa fa-google"></i>#}
{#Via {{ 'disqus' | trans({}, 'HWIOAuthBundle') }}#}
{#</a>#}
<h1 class="text-right"> <h1 class="text-right">
<a class="btn btn-default btn-{{ "google" }}" href="{{ hwi_oauth_login_url("google") }}">
<i class="fa fa-{{ "google" }}"></i>
Login via {{ "google" | trans({}, 'HWIOAuthBundle') }}
</a>
<a class="btn btn-default btn-{{ "twitter" }}" <a class="btn btn-default btn-{{ "twitter" }}"
href="{{ hwi_oauth_login_url("twitter") }}"> href="{{ hwi_oauth_login_url("twitter") }}">
<i class="fa fa-{{ "twitter" }}"></i> <i class="fa fa-{{ "twitter" }}"></i>
{{ "twitter" | trans({}, 'HWIOAuthBundle') }} Login via {{ "twitter" | trans({}, 'HWIOAuthBundle') }}
</a> </a>
<a class="btn btn-primary" <a class="btn btn-primary"
href="{{ path('fos_user_security_login') }}"> href="{{ path('fos_user_security_login') }}">