﻿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
35030	Make django.contrib.auth decorators work with async functions.	Mike Lissner	Dingning	"We're slowly moving our code base over to async views and tests. Django 5.0 is a big leap forward for this, but we've found that there's still no async version of the @login_required decorator. 

We're working around it with some funky decorator usage:


{{{
@sync_to_async
@login_required
@async_to_sync
async def our_view(request):
}}}

Buuuut, it'd be great not to need to do all this and to either have an async version of login_required (@alogin_required, perhaps?) or for it to just work with async views. 

I don't think there's an open issue for this, but amusingly, in [https://code.djangoproject.com/ticket/31949#comment:27 a comment 11 months ago],  Carlton Gibson touched on making login_required work with async, but he thought it'd take another five years. Perhaps we can do better. :)"	New feature	closed	contrib.auth	dev	Normal	fixed	async, decorator	Jon Janzen Dingning Ben Lomax	Ready for checkin	1	0	0	0	0	0
