Mobile app log in bug

Hi,


Whenever i try to log into my mobile app that is dependent on a reactive web app (all the same data and widgets etc) the log in doesn't work. it renders as if it's about to log in but it just clears the textboxes aswell. i checked behind the login button and the destination is set to go to the main menu. is there something i didn't set up properly when creating the app at first?


Thank you!

Hi,

That log is indeed not about a login issue, and the flow in the screenshot seems ok (unless you have a redirection etc. in one of the actions about Sync).

I suggest you create a new mobile app, add an empty screen and try logging in there, without changing the Login flow that comes with the new app. If it works, then you can compare its flow with yours, and maybe correcting a difference solves the issue.

I also suggest that you debug the login flow, there you should be seeing at which step (thus why) the redirection is occurring.

Hi,

Can you give more details, i.e. what happens right after it seems to be logging in, but does not? This sounds like the platform thinks it is logged in, and tries to redirect to a screen, but that screen redirects back to the login screen because the user is actually not logged in, for some reason. This might also explain why the textboxes are cleared. 

It can depend on many things, e.g. the screen you are redirecting to is in another domain so the login is actually not done for the target app; or the target screen requires a role which the user doesn't have (I would actually expect a redirection to Invalid Permissions screen in that case). 

Are you able to see the error / general logs in Service Center? Logs can give some clue. You can also try debugging the login flow to see where and why the redirection back to Login screen happens.

Also, it doesn't sound very optimal that the mobile app depends on a reactive web app, e.g. an end-user module depends on another end-user module. It can use some common core widgets from a Core Widgets module, but if it uses the same login flow of another end-user module, then it might be better to have the login flow in a common Theme.

Hi,

I tried to change the destination to the main menu but it still doesnt work

Nothing comes up in the error log in service studio 

This is what comes up in the general log in service center:


Attached is the code behind the log in button, im not too sure what i'm doing wrong 


Thank you for you help!

Screenshot 2022-02-16 at 14.12.24.png

Hi,

That log is indeed not about a login issue, and the flow in the screenshot seems ok (unless you have a redirection etc. in one of the actions about Sync).

I suggest you create a new mobile app, add an empty screen and try logging in there, without changing the Login flow that comes with the new app. If it works, then you can compare its flow with yours, and maybe correcting a difference solves the issue.

I also suggest that you debug the login flow, there you should be seeing at which step (thus why) the redirection is occurring.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.