Posts

Django You have multiple authentication backends - solution

ValueError: You have multiple authentication backends configured and therefore must provide the 'backend' arg ument or set the 'backend' attribute on the user. a short solution to fix this error and also i am going to let you know ' what causing this error ! basically this error is triggered by multiple authentication backend which you have set or created for your custom authentication backend as an example of your authentication backend....with your custom authentication backend AUTHENTICATION_BACKENDS = (     'games.backend.EmailorUsernameAuthBackend',     'django.contrib.auth.backends.RemoteUserBackend',     'django.contrib.auth.backends.ModelBackend', )  in your function in which you are using authenticate() and login() method's   this error say's add backend argument or set 'backend' attribute on user.  just do this example: user = authenticate(request,username=username, password= password) log...