enkodellc / blazorboilerplate

Blazor Boilerplate / Starter Template with MudBlazor
MIT License
1.87k stars 369 forks source link

Server Side authentication fails for valid user #395

Closed jarmstrong52 closed 4 years ago

jarmstrong52 commented 4 years ago

Client Side Authentication works for default users, however The Server Side authentication fails. I'm using the latest development build. I've used different browsers to make sure it isn't a cookie issue. I've stepped through the code several times and can't figure out why it fails on the server but not the client.

GioviQ commented 4 years ago

Can you reproduce the issue in https://blazor-server.quarella.net/ ?

jarmstrong52 commented 4 years ago

No the site allows login to ssb. But then you knew that. My point is that running the latest build of the development branch, untouched code, works for csb but not ssb. Earlier builds no problem.

GioviQ commented 4 years ago

No, I have no issue with https://blazor-server.quarella.net/ which runs the latest build of the development branch.

Do you run locally with Visual Studio? A debug issue?

jarmstrong52 commented 4 years ago

Thanks for the quick response! I'm using VS2019 latest updates. I'm trying to adapt BB for a company project. I'm glad that Finbuckle gb is out. Currently I'm using an earlier dev branch without Finbuckle, and it works in my dev environment fine. I cloned the latest dev branch and can't get login for server side working. Stepping through code in debug mode In the AuthorizeAPI I get a 400 not authorized. Line 62. result {"Version":"1.0.0.0","StatusCode":400,"IsError":false,"Message":"User Model is Invalid"}. It works in client side mode, but not server side.

GioviQ commented 4 years ago

In the last version AuthorizeApi is https://github.com/enkodellc/blazorboilerplate/blob/development/src/Shared/BlazorBoilerplate.Shared/Services/AccountApiClient.cs

So delete all, db included. Download latest build and retry.

jarmstrong52 commented 4 years ago

Many thanks! I'll get on it. Thanks for all the work. The project is impressive!

GioviQ commented 4 years ago

Look at https://gitter.im/blazorboilerplate/community because another user has strange encoding issue, but with master branch.

jarmstrong52 commented 4 years ago

Issue is resolved