docs: def process_request(self, request):
          """
          Log user in if `request` contains a valid login token.
  
          Return a HTTP redirect response that removes the token from the URL
          after a successful login when sessions are enabled, else ``None``.
  
          """
          token = request.GET.get(TOKEN_NAME)
          user = None if token is None else authenticate(url_auth_token=token)
  
          # If the sessions framework is enabled and the token is valid,
          # persist the login in session.
          if hasattr(request, 'session') and user is not None:
              login(request, user)
              # Once we persist the login in the session, if the authentication
              # middleware is enabled, it will set request.user in future
              # requests. We can get rid of the token in the URL by redirecting
              # to the same URL with the token removed. We only do this for GET
              # requests because redirecting POST requests doesn't work well. We
              # don't do this on Safari because it triggers the over-zealous
              # "Protection Against First Party Bounce Trackers" of ITP 2.0.
              if (
                  hasattr(request, 'user') and
                  request.method == 'GET' and
                  not self.is_safari(request)
              ):
                  return self.get_redirect(request)
  
          # If the authentication middleware isn't enabled, set request.user.
          # (This attribute is overwritten by the authentication middleware
          # if it runs after this one.)
          if not hasattr(request, 'user'):
              request.user = user if user is not None else AnonymousUser()