Open piotrkolodziejski opened 4 years ago
i solve problem, this app doesnt redirect errors
What was the solution? same problem here :/
In my case I was sendig wrong provider on request ("google" wich is the provider for google openId, but I only had configured "google-oauth2"), once I fix that, still was using the client_id and client_secret from the wrong app so google keep responding uri mismatch response. Double check guys, dont spend 1 week like me.
Hi,
i prepare my enviroment for rest social
`INSTALLED_APPS = [ ... "social_django", 'rest_social_auth', ] AUTHENTICATION_BACKENDS =( "social_core.backends.github.GithubOAuth2", 'django.contrib.auth.backends.ModelBackend', ) TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ ... "social_django.context_processors.backends", "social_django.context_processors.login_redirect", ]}}] SOCIAL_AUTH_GITHUB_KEY = '' SOCIAL_AUTH_GITHUB_SECRET = ''
SOCIAL_AUTH_USER_FIELDS = ['email', 'username']
SOCIAL_AUTH_GITHUB_SCOPE = ['email', ] SOCIAL_AUTH_GITHUB_PROFILE_EXTRA_PARAMS = { 'fields': 'id, name, email, age_range', } SOCIAL_AUTH_REDIRECT_IS_HTTPS = True ` but when i post on url http://127.0.0.1:8000/login/social/jwt-pair/ with body parameters { "code":"qwueyuwqe72172", "provider":"github" } i got 400 , Bad Request