Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes you made to Startup.cs cause below error #220

Closed
PeterJD opened this issue Mar 3, 2019 · 6 comments
Closed

Changes you made to Startup.cs cause below error #220

PeterJD opened this issue Mar 3, 2019 · 6 comments

Comments

@PeterJD
Copy link

PeterJD commented Mar 3, 2019

Money.UI.Backend

An unhandled exception occurred while processing the request.
InvalidOperationException: No authentication handler is registered for the scheme 'Cookies'. The registered schemes are: Bearer, Identity.Application, Identity.External, Identity.TwoFactorRememberMe, Identity.TwoFactorUserId. Did you forget to call AddAuthentication().AddSomeAuthHandler?
Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, string scheme, AuthenticationProperties properties)

Stack Query Cookies Headers
InvalidOperationException: No authentication handler is registered for the scheme 'Cookies'. The registered schemes are: Bearer, Identity.Application, Identity.External, Identity.TwoFactorRememberMe, Identity.TwoFactorUserId. Did you forget to call AddAuthentication().AddSomeAuthHandler?
Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, string scheme, AuthenticationProperties properties)
Money.Startup+<>c+<b__5_2>d.MoveNext() in Startup.cs
+
await context.ChallengeAsync(CookieAuthenticationDefaults.AuthenticationScheme);
Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.MigrationsEndPointMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

@PeterJD
Copy link
Author

PeterJD commented Mar 3, 2019

line 138

@maraf
Copy link
Owner

maraf commented Mar 3, 2019

Hi @PeterJD.
I know that, all commits related to the #218 are work in progress.
I'm going to completely remove the Money.UI.Backend and advance to an api-centric version, in the Money.Api.

If you want latest working version, please use tag blazor-v1.7.0.

@PeterJD
Copy link
Author

PeterJD commented Mar 4, 2019 via email

@maraf
Copy link
Owner

maraf commented Mar 4, 2019

I'm going to close this one. If you have any further questions, feel free to ask.

@maraf maraf closed this as completed Mar 4, 2019
@engmohamedcs
Copy link

What is the solution?

@maraf
Copy link
Owner

maraf commented Dec 2, 2020

We don't use cookies for a long time. When code was migrated to Money.Api, the authentication moved to bearer tokens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants