Skip to content

Commit

Permalink
Fix accessing login page while not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxocube committed Jan 1, 2025
1 parent b5e88fb commit 6b127c0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@page "/Account/AccessDenied"
@using Microsoft.AspNetCore.Authorization
@attribute [AllowAnonymous]

<PageTitle>Access denied</PageTitle>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
@page "/Account/ConfirmEmail"
@using System.Text
@using MediaFeeder.Data.db
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Identity
@using Microsoft.AspNetCore.WebUtilities

@inject UserManager<AuthUser> UserManager
@inject IdentityRedirectManager RedirectManager

@attribute [AllowAnonymous]

<PageTitle>Confirm email</PageTitle>

<h1>Confirm email</h1>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
@page "/Account/ConfirmEmailChange"
@using System.Text
@using MediaFeeder.Data.db
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Identity
@using Microsoft.AspNetCore.WebUtilities

@inject UserManager<AuthUser> UserManager
@inject SignInManager<AuthUser> SignInManager
@inject IdentityRedirectManager RedirectManager

@attribute [AllowAnonymous]

<PageTitle>Confirm email change</PageTitle>

<h1>Confirm email change</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
@using System.Text
@using System.Text.Encodings.Web
@using MediaFeeder.Data.db
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Identity
@using Microsoft.AspNetCore.Mvc
@using Microsoft.AspNetCore.WebUtilities
@attribute [IgnoreAntiforgeryToken]
@attribute [AllowAnonymous]

@inject SignInManager<AuthUser> SignInManager
@inject UserManager<AuthUser> UserManager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@page "/Account/InvalidUser"
@using Microsoft.AspNetCore.Authorization
@attribute [AllowAnonymous]

<PageTitle>Invalid user</PageTitle>

Expand Down
2 changes: 2 additions & 0 deletions MediaFeeder/MediaFeeder/Components/Account/Pages/Login.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@page "/Account/Login"
@using Microsoft.AspNetCore.Authorization
@attribute [AllowAnonymous]

<PageTitle>Log in</PageTitle>

Expand Down

0 comments on commit 6b127c0

Please sign in to comment.