Django You have multiple authentication backends - solution
ValueError: You have multiple authentication backends configured and therefore must provide the 'backend' argument 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)detail : backend=' yourappname.backendlocationinappdirectory.backendfilename'
login(request, user, backend='games.backend.EmailorUsernameAuthBackend')
i hope this small explanation helps you out but make sure to add custom backend in your login() function as an argument.
let me know what you did in comments below.
The wire-to-wire app at Wynn casinos - JD'sHub
ReplyDeleteFor 구리 출장안마 the first time in three decades, Wynn resorts in Las Vegas have not had to be plugged into 아산 출장마사지 a wall and 성남 출장안마 put down 김천 출장샵 in public places to 성남 출장안마 function