Navigation component inside module doesn't load any apps on redirect from login

Our organization uses a module for the header across all apps, the header includes the default Navigation component with manually defined Apps.

The issue is that on the user's first login, the navigation component doesn't load at all, however once the user refreshes the page and from there on out, the navigation component loads everything properly.

The navigation component is great as it automatically hides Apps depending on what the user has permission for, but it seems this detection doesn't work properly on the first login and it only shows the current app until a refresh fetches the correct information to show everything.

Before refresh:
Screenshot 2025-08-19 at 11.41.44 AM

After refresh:
image

Thanks!

Hey @connorjan - I thought this would be fairly easy to reproduce, but it's working as expected in all my testing. The underlying issue is likely a lot more nuanced. :thinking:

A few clarifying questions:

  • How are you logging in? With SSO or email and password?
  • Does your app and/or module utilize releases?

How are you logging in? With SSO or email and password?

Just with email and password

Does your app and/or module utilize releases?

Yes both our app and module utilize releases

While logging in, can you keep your browser's Network tool open and take a closer look at the /api/pages query?

You should be getting a full list of the apps that your user has permission to access, which is then used to populate the navigation component.

I see two separate requests to the /api/pages endpoint and both responses include the full list of pages I am expecting, but the module still does not populate.

When I refresh the page, I also see two requests to that endpoint with the same response, but this time the component does populate.

I'm at a bit of a loss, I'm afraid. :thinking: The only way I can reproduce this behavior is by blocking the api/pages request entirely. It's possible that the behavior you're seeing could be the result of that query taking a longer time to run, however. And it's odd that you're seeing two of them. Do you mind sending me a JSON export of your module?

In my production header module I am using the Get user apps and folders query to add some behavior, I'm guessing this calls the same endpoint under the hood which would explain the 2nd request. However in my debugging when stripping out features of the production header to narrow the issue down, even removing this extra request doesn't solve it.

One extra piece of info that may be relevant is that we are utilizing the custom log in screen functionality:

It does seem that even though the openApp call is hardcoded in the GUI to go to the Home app, it does re-direct properly if attempting to visit a different app URL while signed out (which I like the behavior of although it could be confusing I guess).

There's the culprit! I'm not sure how or why, but something about the Go to app action is preventing the expected behavior. I can dig into it and file a bug with the team, but a quick fix is to use the Go to URL action on query success, instead.

Give that a shot and let me know if it works for you. Thanks for your patience and persistence!

Perfect just verified that this works, and it still respects the user's intended URL and redirect's properly even though the URL is hardcoded which is great to see.

Thanks for the help!

1 Like