def METHOD_NAME(self, request):
    # this is copied from the a pending PR on django-allauth-2fa repo:
    # https://github.com/valohai/django-allauth-2fa/pull/131
    login_kwargs = request.session.pop("allauth_2fa_login", None)
    if login_kwargs is None:
        raise PermissionDenied()
    signal_kwargs = login_kwargs.get("signal_kwargs")
    if signal_kwargs:
        sociallogin = signal_kwargs.get("sociallogin")
        if sociallogin:
            signal_kwargs["sociallogin"] = SocialLogin.deserialize(
                sociallogin
            )
    return login_kwargs