How to enable login with Google,Facebook,..etc

379 views
Skip to first unread message

truong nguyen

unread,
Oct 14, 2016, 11:01:06 PM10/14/16
to General Open edX discussion
Hi everyone !
I am trying to enable login or register with Google or Facebook follow the steps:
1 Enable "ENABLE_THIRD_PARTY_AUTH": true ,in lms.env.json
2 Fill client id and client secret in lms.auth.json:

"THIRD_PARTY_AUTH": {
    "Google": {
        "SOCIAL_AUTH_GOOGLE_OAUTH2_KEY": "google_key",
        "SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET": "google_secret"
    }
3 restart lms:
I am not sure with above these steps,After all I login into lms but button sign in with google don't appear

Bastiaan Franssen

unread,
Oct 16, 2016, 3:19:10 AM10/16/16
to General Open edX discussion
Maybe a very odd question, but do you have an adblocker or an extension in your browser called ghostery and enabled the blocking of social media? That was our problem in the beginning. Very silly, but extremely annoying.

truong nguyen

unread,
Oct 16, 2016, 11:01:31 AM10/16/16
to General Open edX discussion
This is file log of lms (/edx/var/log/lms/edx.log)
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
    return func(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/apps/django_app/utils.py", line 51, in wrapper
    return func(request, backend, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/apps/django_app/views.py", line 19, in auth
    return do_auth(request.backend, redirect_name=REDIRECT_FIELD_NAME)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/actions.py", line 14, in do_auth
    for field_name in backend.setting('FIELDS_STORED_IN_SESSION', []):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/backends/base.py", line 30, in setting
    return self.strategy.setting(name, default=default, backend=self)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/third_party_auth/strategy.py", line 30, in setting
    raise Exception("Can't fetch setting of a disabled backend/provider.")
Exception: Can't fetch setting of a disabled backend/provider.
Oct 16 21:15:53 ubuntuserver [service_variant=lms][django.request][env:sandbox] ERROR [ubuntuserver  3797] [base.py:256] - Internal Server Error: /auth/login/google-oauth2/
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
    return func(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/apps/django_app/utils.py", line 51, in wrapper
    return func(request, backend, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/apps/django_app/views.py", line 19, in auth
    return do_auth(request.backend, redirect_name=REDIRECT_FIELD_NAME)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/actions.py", line 14, in do_auth
    for field_name in backend.setting('FIELDS_STORED_IN_SESSION', []):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/backends/base.py", line 30, in setting
    return self.strategy.setting(name, default=default, backend=self)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/third_party_auth/strategy.py", line 30, in setting
    raise Exception("Can't fetch setting of a disabled backend/provider.")
Exception: Can't fetch setting of a disabled backend/provider.
Oct 16 21:16:02 ubuntuserver [service_variant=lms][root][env:sandbox] ERROR [ubuntuserver  3800] [exceptions.py:9] - Uncaught exception from <class 'django.core.handlers.wsgi.WSGIHandler'>
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
    return func(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/apps/django_app/utils.py", line 51, in wrapper
    return func(request, backend, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/apps/django_app/views.py", line 19, in auth
    return do_auth(request.backend, redirect_name=REDIRECT_FIELD_NAME)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/actions.py", line 14, in do_auth
    for field_name in backend.setting('FIELDS_STORED_IN_SESSION', []):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/backends/base.py", line 30, in setting
    return self.strategy.setting(name, default=default, backend=self)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/third_party_auth/strategy.py", line 30, in setting
    raise Exception("Can't fetch setting of a disabled backend/provider.")
Exception: Can't fetch setting of a disabled backend/provider.
Oct 16 21:16:02 ubuntuserver [service_variant=lms][django.request][env:sandbox] ERROR [ubuntuserver  3800] [base.py:256] - Internal Server Error: /auth/login/google-oauth2/
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
    return func(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/apps/django_app/utils.py", line 51, in wrapper
    return func(request, backend, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/apps/django_app/views.py", line 19, in auth
    return do_auth(request.backend, redirect_name=REDIRECT_FIELD_NAME)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/actions.py", line 14, in do_auth
    for field_name in backend.setting('FIELDS_STORED_IN_SESSION', []):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/social/backends/base.py", line 30, in setting
    return self.strategy.setting(name, default=default, backend=self)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/third_party_auth/strategy.py", line 30, in setting
    raise Exception("Can't fetch setting of a disabled backend/provider.")
Exception("Can't fetch setting of a disabled backend/provider.")
WHO CAN HELP ME SOLVE THE PROBLEM ABOVE ?
THANK IN ADVANCED!

Vào 14:19:10 UTC+7 Chủ Nhật, ngày 16 tháng 10 năm 2016, Bastiaan Franssen đã viết:

Liubov Fomicheva

unread,
Oct 17, 2016, 7:19:15 AM10/17/16
to General Open edX discussion
Hello Truong Nguyen,

In recent versions of the plaform (Dogwood, Eucalyptus) third party auth configuration was changed, see this thread.

Liubov

суббота, 15 октября 2016 г., 6:01:06 UTC+3 пользователь truong nguyen написал:

Dhastha Gheer

unread,
Aug 9, 2017, 12:12:24 AM8/9/17
to General Open edX discussion
Is this problem solved? I have same issue
Reply all
Reply to author
Forward
0 new messages