django-allauth を使用して、Stripe Connect でユーザーを認証します。Stripe に接続してログインできるように見えますが、私の Web サイトに戻ると、次のような allauth エラー テンプレートが表示されます。
An error occurred while attempting to login via your social network account.
私がここで間違ったことについてのアイデアはありますか?
これが私がやったことです。
設定.py
INSTALLED_APPS = [
...
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.stripe',
...
]
AUTHENTICATION_BACKENDS = [
...
'allauth.account.auth_backends.AuthenticationBackend',
...
]
SITE_ID = 1
urls.py
urlpatterns = [
...
url(r'^accounts/', include('allauth.urls')),
...
]
login.html
{% if user and not.is_anonymous %}
<h2>Hello, {{ user.get_full_name }}.</h2>
{% else %}
<p><a href="{% provider_login_url 'stripe' %}" class="btn btn-default">Stripe</a></p>
{% endif %}
ストライプコネクト
Website URL: https://127.0.0.1:8000
Redirect_URIs: http://127.0.0.1:8000/accounts/stripe/login/callback/
ドキュメントに従って、次のように django admin でソーシャル アプリケーションを設定します。
Social Applications = http://127.0.0.1:8000/