How to mock login in cypress

There’s an open issue on GitHub with someone trying to do something similar to what you want. I’d suggest joining that conversation.