Tuesday, August 21, 2018

Debugging allauth social authentiacation

Hey,

I am trying to include social authentication with google to my site with allauth. There are certain requirements to the site. I  am trying to modify the adapters, but modifying a simple adapter is giving the server error. It is not giving what the error is, but just popping a server error.

this is the sample code I wrote --

from allauth.Socialaccount.adapter import DefaultSocialAccountAdapter

class Loginuser(DefaultAccountAdapter):

    def is_open_for_signup(self, request):
        print("hello")
        return False


As per the documentation method, is_open_for_signup is present in both DefaultSocialAccountAdapter and DefaultAccountAdapter classes and any of them can be overridden. But it works fine with class DefaultAccountAdapter and not with other. It only pops a server error and does say what the error is !!
My intention is to find the errors in Django allauth code. Everything is going fine (i.e the OAuth process) but it gives a server error at the callback URL !!!

Need help

thanks

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/249a1f6f-a7ab-463a-8b25-d2003c2d2d87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment