user.is_authenticated always returns False after successful MSAL login

Hello Folks,

I recently moved ADAL to MSAL and seeing that after successful MSAL login when i render view i am always getting request.user= None.

So this is how my set up is:

def signin(request):
app = PublicClientApplication(
auth_url = app.get_authorization_request_url(settings.MSAL_SCOPES)
return redirect(auth_url)

After this login i will be redirected to ,

def msal_callback(request):
return render(request, ‘web/index.html’)

But in my that index.html i have certain views with @login_required attribute, which gives me 403 due to user.is_authenticated always returns False

This is my middlewares

This is also there in TEMPALTES ‘django.contrib.auth.context_processors.auth’,

and this is my auth backends

Any help would be appreciated.