Skip to content

Authorization broken in Razor Pages #7011

@davidfowl

Description

@davidfowl

Describe the bug

The Authorize attribute no longer works in Razor Pages applications.

To Reproduce

  1. Make a new Razor Pages project with individual auth
  2. Add an [Authorize] attribute on the Index page
  3. Running the application doesn't redirect to the login page.

Expected behavior

The page should redirect to the Login page.

Additional context

This is using build 3.0.0-preview-19073-0424

Seems like the authorize attribute isn't being exposed as authorize metadata.

cc @rynowak @pranavkm @JamesNK

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesbugThis issue describes a behavior which is not expected - a bug.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions