Hi guys, everything works fine on a pc, login, logout redirects But on the phone, when I login it just redirects back to login I've tried clearing cache and also incognito but nothing worked
Samuel T
1 year ago
Maybe it has something to do with the toddle extension?
Fisher
1 year ago
Out of curiosity, is your phone's browser getting the site in "Desktop Mode" ?
Janis
1 year ago
Did you set “prevent default” on your login form submission event?
Max
1 year ago
Can you share the project URL? Then I or someone else can have a look
Samuel T
1 year ago
Thank you!
Samuel T
1 year ago
https://peia_affiliates.toddle.site/ Does this work? To explain, I have a workflow on the main page /dashboard that calls a "login" api on load, and if it fails, redirects to /login It works good on desktop, but on mobile always redirects back to login
Most phone browsers have a "desktop mode" setting, where the browser then behaves like a desktop and not a phone. Trying it in that mode might help narrow down the issue.
Can you send a screenshot of your login flow and the actions?
Max
1 year ago
Hey @Samuel T! The go to url action has to go in the success branch of the set cookie action
Samuel T
1 year ago
@Max It looks like this
Samuel T
1 year ago
@Janis I don't think mine does, plus I've tested other phones and browsers But that should not even cause an issue right? Whether desktop or mobile
Max
1 year ago
The screenshot I shared is from your project @Samuel T This is on the login page. You should call the "go to URL" action in the success branch of the set cookie action. Otherwise it can happen that the cookie is not set
Samuel T
1 year ago
Makes so much sense. And it worked, thank you @Max!
I assume that the desktop was just faster and was able to set the cookie before the next action hit.
Samuel T
1 year ago
Got it 🙂
Samuel T
1 year ago
@Max One last question about this - in order to redirect anyone who's not logged in from the dashboard to login, I created a workflow but I don't know if that's the right setup. Can you kindly have a look?
Samuel T
1 year ago
Was asking cos when you click the links in the nav bar to change pages a few times, it redirects you to the login page at some point as if you are not authenticated
Did you change your project to private? I cannot check the code anymore. My best guess is that you are running on Xano free trial and that you hit your API limits. Could be the reason why the call throws an error