Closed pablopioli closed 4 years ago
Closing this as it's totally my fault.
I was trying to use this library in a ASP.NET Core hosted app. As outlined in the guidance (included in the readme) in this case the better option are server cookies and not JWT in the client.
Hi and sorry for the late response: this has been a busy period! :smile:
I'll reopen this issue because there could be a problem with blazor wasm too when the application is not hosted in the site root.
The issue belongs to this line https://github.com/sotsera/sotsera.blazor.oidc/blob/085d8276447f30118928440b958690c625450485/src/Sotsera.Blazor.Oidc/CallbackPages/AuthenticationRedirect.razor#L17 where there is a default redirect to the /
route after a redirect login. The same happens in the redirect logout. I'll have to think about how to make these redirect routes configurable or, at the very least, redirect to NavigationManager.BaseUri
.
Thanks for reaching out!
In the mean time you can copy these pages in your application, change the offending redirect and configure them as callback URIs using the AuthenticationRedirectCallbackUri
and LogoutRedirectCallbackUri
configuration options.
Hi, for now I ended up using NavigationManager.BaseUri in the redirect callback pages. Can you please test this new version and see if the problem have been fixed?
Hi and sorry for the late response: this has been a busy period! 😄
Don't worry. I assume everyone has a life to live, if you have problems here is the source code, go and fix it yourself.
I will test it in the context of static file hosting https://github.com/sotsera/sotsera.blazor.oidc/issues/11 will publish a complete sample if I can make to work.
Thanks!
Working with and without PathBase, so closing the issue.
When the autentication finishes NavigationManager throws an exception