How to get Custom Adapter to respect the 'next' URL query parameter
I am using allauth in my Django project and I have set up a custom account adapter which I have specified in settings.py
- ACCOUNT_ADAPTER
. My issue is once the user logs in in at a URL like /accounts/login/?next=/checkout/, my Custom Adapter has a get_login_redirect_url
method defined to redirect users based on their user type. The thing is I would like this adapter to respect the next
URL parameter. But when I look at the values - request.GET
, request.POST
, request.session
, the next
parameter is blank or empty.
How to achieve this?