Angular-auth-oidc-client: Wait time for first load

Created on 13 Mar 2020  路  6Comments  路  Source: damienbod/angular-auth-oidc-client

Hi all,

I have a small question regarding the 'isauthorizedrace_timeout_in_seconds' config parameter.
We use this component (latest version) for our Angular application, and no matter how high I set the 'isauthorizedrace_timeout_in_seconds' parameter it always waits for this timeout before it continues.

This only happens when you enter the application with a new browser window. It seems like the component is waiting for something that never happens. When you refresh the page it seems to authenticate right away.

If we set this parameter to 1 second, older browsers go into a loop of trying to authenticate.

If there something we're missing here? Do we need to set some additional settings or call some method?
At this point we've tried almost everything (looking at all the samples povided).

Can someone help us with this?

Thnx!

Release 11

All 6 comments

We have fixed this by manually calling the _onAuthorizationResult.next() after checking the URL for any code or state parameters.
The issue was that when there's no code or state parameters in the URL, the code would just wait for the timeout to complete (race condition, defaults to 5 seconds).

By calling the _onAuthorizationResult manually with an un-authorized result the code will continue and redirect to the auth server.

This is what our code currently looks like:
image

@florisrobbemont I plan to improve this in version 11.

Cool! Any idea on a release date for version 11? Or is it too early to say?

At the moment not, I have a time problem at the moment, day job is eating up my time as well as home schooling...

No rush. We鈥檝e fixed the problem for now.
Focus on what鈥檚 important.

Stay safe!

fixed in version 11. Will be released in the next few days after testing

If you want to have an early look

https://github.com/damienbod/angular-auth-oidc-client/tree/dev-version-11

Was this page helpful?
0 / 5 - 0 ratings