Page refresh loads slowly

I built an authentication service following Kim’s example Everything works as expected in my local development environment. When I test using the angular build - watch. I have a bug on page refresh.

The page refresh action is very slow to complete the authentication cycle(1.5min).
Has anyone encountered slow page refresh in the angular build version of their app?

Hey there @mr.Nigel,

There shouldn’t be any direct cause of that within the tutorial. I will start building out the example myself but in the mean time Can you inspect the network requests you have coming across and see any directly correlation with it? Thanks!

Hey, In looking at the network traffic, I can see the auth call go out and come back normally, the issue seems to be in localAuth() steps.

The this.isAuthenticated$ pipe is taking a long time to complete, then after it completes, the ‘login’ function is fired’ finally, hitting the handleAuthCallback(). There seems to be some timing out in that chain and i can’t figure out why.

I can provide logs or any other info to help clarify

Here’s the repo:

Thanks for sharing, I’ll be sure to take a look!

1 Like

I wanted to follow up @mr.Nigel on this subject, I some time this afternoon and created a fresh project leveraging the mentioned Quick Start. In doing so I did not experience the breakdown that you are mentioning. Tomorrow I will take some additional time to review your repo and compare and contrast to see if I can find anything that may be causing this breakdown. Thanks!

Sounds good. I’ll do a comparison also. Thanks

Spent a bit of time looking over everything here. Can you direct message me your tenant name while I continue to investigate? Thanks!

1 Like

I noticed when diving into your account that you have two separate local host address declared across the board in your dashboard? Is both needed in your implementation? When looking at your repo I don’t see you change the port you are running on in your package.json. If not, it may be worth cleaning up and seeing if that makes a difference. Thanks in advance!

Both local addresses are dev vs prod builds to check before deployment.

Hmm, I’ll take a look at the missing ports in the package.json.

Thanks for digging into this problem. You’ve confirmed I’ve built some part of my app wrong and I can resolve that issue. Thanks so much for all your help.

we can close this ticket if needed. Thanks for all your help

1 Like

Sounds great @mr.Nigel, please let us know if you run into any issues in the future!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.