dboard: 구글로그인만 가능
1. 패스워드 기반 가입/로그인 기능 제거
path('accounts/login/', allauth_views.login, name='account_login'),
path('accounts/logout/', allauth_views.logout, name='account_logout'),
path('accounts/', include('allauth.socialaccount.providers.google.urls')),2. 로그인, 로그아웃 화면이 따로 존재하고 거기서 버튼을 눌러야 동작하는걸 한번에 로그인/로그아웃 되도록 수정
{% load socialaccount %}
<html>
{% if user.is_authenticated %}
User is authenticated
<br/>
{% if user.is_superuser %}
<a href="{% url 'admin:index' %}">Admin</a>
<br/>
{% endif %}
<form action="{% url 'account_logout' %}" method='POST'>
{% csrf_token %}
<button type="submit">Logout</button>
</form>
{% else %}
User is not authenticated
<br/>
<form action="{% provider_login_url 'google' %}" method='POST'>
{% csrf_token %}
<button type="submit">Login with Google</button>
</form>
{% endif %}
</html>이제 로그인/로그아웃이 된다.


이제 구글로그인이 생겼으니, 게시판을 만들어 보자!