sotsera / sotsera.blazor.oidc

OpenID Connect client for Blazor client-side projects
https://blazor-oidc.sotsera.com/
Apache License 2.0
20 stars 8 forks source link

OidcHttpClient loses token when reloading application #16

Closed ChristianWeyer closed 4 years ago

ChristianWeyer commented 4 years ago

First of all thanks for this lib!

When running the sample application (https://github.com/sotsera/sotsera.blazor.oidc/tree/master/samples/ClientSide) and logging in as e.g. bob, everything is fine. I can happily call the test API successfully.

However, when I reload the application in the browser I am still logged in (and the token can be seen in storage, but OidcHttpClient seems to have lost the token and the API call fails.

ghidello commented 4 years ago

Thanks for pointing this out. I'll look into it.

ChristianWeyer commented 4 years ago

This would be great to have it fixed :-) Thanks.

ChristianWeyer commented 4 years ago

Do you need more input from my side @ghidello ?

ChristianWeyer commented 4 years ago

Awesome, thank you!

ghidello commented 4 years ago

I just had some time this evening to look into the issue and it was a stupid mistake on my part (partially due to the fact that I've never completed the token renewal and so I never really tested the token usage): I just published a new nuget package. Let me know If it's working for you too.

I was thinking to rewrite the whole library but the Asp.Net team is working on something that will probably make this library obsolete (see #15 ).

ChristianWeyer commented 4 years ago

Thanks again, it works now.