﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27027	force_login() now requires an authentication backend if multiple are configured	Ben Demboski	nobody	"I believe this was an unintentionally-breaking change introduced in the [https://github.com/django/django/commit/b6433866682baac35a953e59298dff7f399ac49b fix for #24855]. The [https://github.com/django/django/commit/b6433866682baac35a953e59298dff7f399ac49b#diff-97160f50594424a40f2621d5a3c581ccL606 code] in the test client's `force_login()` that chooses a default authentication backend as the first one in settings was removed, but the [https://github.com/django/django/commit/b6433866682baac35a953e59298dff7f399ac49b#diff-82ec6fd74a1cab41408fbf5bf0998f58R115 new code] added to the `login()` method throws an exception if no backend is specified and multiple are configured in settings.

The result is that applications with multiple authentications backends that were previously using `force_login()` without specifying a backend are broken when running on 1.10, and need to be updated to specify a backend. This doesn't seem like it's in keeping with the intent of the `force_login()` test client helper, but if it is it should at least be documented as a (test code) breaking change."	Bug	closed	Testing framework	1.10	Normal	fixed			Unreviewed	1	0	0	0	0	0
