    def get_state_cookie_name(self, state_id='', /):
        """Get the cookie name for oauth state, given an encoded OAuth state

        Cookie name is stored in the state itself because the cookie name
        is randomized to deal with races between concurrent oauth sequences.
        """
        state = self._decode_state(state_id)
        return state.get('cookie_name') or self.state_cookie_name
Get the cookie name for oauth state, given an encoded OAuth state

Cookie name is stored in the state itself because the cookie name
is randomized to deal with races between concurrent oauth sequences.
jupyterhub/services/auth.py