I’m working on a dynamic page which needs to be allowed only for specific users who bought access to it on Wix Studio
i selected the page as members only and I’m filtering out the non-paying customers in the beforeRouter call, however the ‘member page’ login check happens only after the beforeRouter call, and i don’t know what to do with non-logged users. I can, of course, send them to a forbidden() page however I’d like them to be sent to a login screen, for a better flow.
i only found a frontend module which does that (“wix-frontend-members” authentication.promptLogin) but it can’t be called in backend code
what’s the best way to achieve this behavior?
thanks in advance, Omer