Categories
Uncategorized

Auth and Chartisan Breaking

So for some reason the authorization of Antilobby breaks some of the charts. I’m not sure where it’s coming from, but it’s definitely happening. I’ve checked almost every area that could be the problem, I’ve run tests with other json requests from different files, all return an issue. I’ve mixed around logic from the working graph to the broken graphs, I’ve placed authorization checks to see if that would include logic to make things work. The only outlier is the first graph on the home page is slightly different. Not sure why it’s not breaking and the rest are.

2 HOURS LATER…

I’ve tried at least 2 hours to find this issue because I need to figure it out before moving on to the next thing. And I did. I found out that the issue was, which was not a problem before, the URLs used for the graphs. I was having no issue with fetching the information *before* and I could still fetch the information when using standalone requests (e.g URL in the browser, postman). It probably had to do with the session domain configuration that I didn’t have specified before. It was part of documentation that I followed that would allow me to use the same login sessions between the two different Laravel applications.

Snippet from the .ENV configuration file
Snippet from the .ENV configuration file

Since the URLs were originally not using the WWW subdomain, I didn’t think that would ever be an issue and I’m not entirely sure it was an issue. All I can think of is that is was part of the session verification and the URL which the Chartisan script was using to fetch information. The script wasn’t using a URL that matched the session data/cookie that was originally made by the login logic from Jetstream. Now while it may be important to truly understand the real cause of this problem I’ll add it to my mental list of things to understand as I continue learning Laravel. From now on, I think I’ll make sure things are more consistent.

Leave a Reply

Your email address will not be published. Required fields are marked *