openedx

What is raise Exception("Can't fetch setting of a disabled backend/provider.") in open Edx?


Trying to integrate third Party Authentication.I am getting error logs like below.
Internal Server Error: /auth/login/google-oauth2/ Traceback (most recent call last):...... File "/edx/app/edxapp/edx-platform/common/djangoapps/third_party_auth/strategy.py", line 34, in setting raise Exception("Can't fetch setting of a disabled backend/provider.") Exception: Can't fetch setting of a disabled backend/provider.

referring docs: https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/latest/configuration/tpa/tpa_integrate_open/index.html
tried solutions:https://groups.google.com/forum/#!topic/openedx-ops/M2FuwlCiQtA
Nothing worked for me.


Solution

  • Provider Configuration as follows

    Go to <LMS URI>/admin/third_party_auth/oauth2providerconfig/. For example, on devstack, go to http://localhost:8000/admin/third_party_auth/oauth2providerconfig/.
    
    Select Add Provider Configuration (OAuth).
    
    Make sure that Enabled is selected.
    
    Make sure that Visible is selected.
    
    For Icon Class, enter the appropriate value.
        For Google, enter fa-google-plus.
        For Facebook, enter fa-facebook.
        For LinkedIn, enter fa-linkedin.
        For Azure, leave the field blank.
    
    For Name, enter the appropriate value.
        For Google, enter Google.
        For Facebook, enter Facebook.
        For LinkedIn, enter LinkedIn.
        For Azure, enter Microsoft.
    
    For Backend Name, select the appropriate value.
        For Google, select google-oauth2.
        For Facebook, select facebook.
        For LinkedIn, select linkedin-oauth2.
        For Azure, select azuread-oauth2.
    

    Add slug (change default)

    Note
    
    If the value does not appear in the list, either the ENABLE_THIRD_PARTY_AUTH setting or the THIRD_PARTY_AUTH_BACKENDS setting is not configured correctly.
    
    For Client ID, enter the client ID that you noted earlier.
    
    Leave Client Secret blank. Open edX sets the secret through lms.auth.json, which is more secure.
    

    Its resolved for me by adding slug in Admin panel › Third-party authentication › Provider Configuration (OAuth) › Add Provider Configuration (OAuth). previously slug set as default.