I am perplexed. When you load my website from it’s root url (For example: www.example.com) it will act as if you’re logged out. But
- If you click on any link (To a router path) from this page (For example, a link that takes you to www.example.com/test) then the app will promptly realize you have a session and log you in (while also taking you to the route you clicked on)
- Loading mostly any other page of my site as your first load will log you in normally (For example if you open up a new tab and type in your brower “example.com/test” then you will land on my site and (assuming you’ve logged in before) the app will promptly know who you are and display your name.
This is a problem because the root url contains the “hub” page which I have heavily customized to my users profile. Some things I’ve tried
~ Disabling fast render (Didn’t change anything)
~ Changing the route path (Nope)
~ “Clear cache and hard refresh”
So it must have something to do with my template right? Except I don’t see anything unusual. The most unusual things are
~ I have a higher number of functions scoped outside of template “events/helpers/oncreated” wrappers.
~ I use “require(dragula.js)”
Also I should mention this all works COMPLETELY fine on any local versions of my website (localhost:3000). It only shows up on the hosted version of page (example.com), which makes debugging annoying.
Edit: Wait, it seems moving the template to a different url DOES work. The reason it didn’t work before was because I was then redirecting the root url to the new url, which DOESN’T work. Uhuh…
So I would still like to solve this.
Additional information: I’m using Iron Router.
Edit2: This may not be as clean cut as it appears. I’ve found that while loading my hub page (now located at “example.com/portal”) it works. But if I load the site from “example.com” (Which is now iron routers default 404 page) and then change the url in the address bar to “example.com/portal” it doesn’t work.