Oinweb / fly-django

Financial Literacy for Youth App
https://www.flyapp.ca
BSD 2-Clause "Simplified" License
12 stars 9 forks source link

No handler was ready to authenticate. #160

Open nicholascarroll opened 7 years ago

nicholascarroll commented 7 years ago

Hi, I installed successfully using the README instructions but on accessing the page got this error: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials

I am new to Django and don't know how to edit the secret_settings.py file.

bartmika commented 7 years ago

Question, can you check your fly_project/settings.py and scroll down until you see:

AUTHENTICATION_BACKENDS = (
    'social.backends.facebook.FacebookOAuth2',    # Custom
    'social.backends.google.GoogleOAuth2',        # Custom
    'social.backends.twitter.TwitterOAuth',       # Custom
    'django.contrib.auth.backends.ModelBackend',  # Custom
)

I think your problem is because fly-django is using python-social-auth library and these "social" backends are causing it. Can you comment them and see if it fixes your problem? You should probably see

AUTHENTICATION_BACKENDS = (
    #'social.backends.facebook.FacebookOAuth2',    # Custom
    #'social.backends.google.GoogleOAuth2',        # Custom
    #'social.backends.twitter.TwitterOAuth',       # Custom
    'django.contrib.auth.backends.ModelBackend',   # Custom
)
nicholascarroll commented 7 years ago

i tried that but its the same. i am running local osx

nicholascarroll commented 7 years ago

to do with

bartmika commented 7 years ago

Thanks for your patients and sorry my suggestion doesn't work. I'll have some time next week to go through and see what the problem is and fix it.

For now, can you try going to settings.py and go comment out the following:

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.template.context_processors.i18n',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
                'fly_project.context_processors.app_constants',             # Custom
                # 'social.apps.django_app.context_processors.backends',       # Third Party
                #'social.apps.django_app.context_processors.login_redirect', # Third Party
            ],
        },
    },
]

You might need to comment out the auth-backend as well.

AUTHENTICATION_BACKENDS = (
    #'social.backends.facebook.FacebookOAuth2',    # Custom
    #'social.backends.google.GoogleOAuth2',        # Custom
    #'social.backends.twitter.TwitterOAuth',       # Custom
    'django.contrib.auth.backends.ModelBackend',   # Custom
)

Let me know if this helps. Also, can you provide more details as well (if the problem persists).