-
Notifications
You must be signed in to change notification settings - Fork 3
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
AllowAnonymous does not work #16
Comments
Hello @franky1017 For guidance on Blazor authentication capabilities, refer to Blazor documentation on the topic. Normally in a Blazor application pages are available to unauthenticated users by default, unless you mark the page with an |
I have specified [AllowAnonymous] on the page. The page briefly shows the
content and within a second, it redirects to login.
I am not doing anything on the page, just static content. Anything you can
think of that will redirect the page to login after a brief second? I've
never had this behavior with other Blazor app before and this is the first
time I am using your component. Any advice is appreciated.
Frank
…On Fri, Jun 21, 2024 at 3:00 AM Yuriy Durov ***@***.***> wrote:
Hello @franky1017 <https://github.com/franky1017>
For guidance on Blazor authentication capabilities, refer to Blazor
documentation
<https://learn.microsoft.com/en-us/aspnet/core/blazor/security/?view=aspnetcore-8.0>
on the topic.
Normally in a Blazor application pages are available to unauthenticated
users by default, unless you mark the page with an [Authorize] attribute.
—
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJETLLPPIF3SDLDRRPOEAFTZIPFSJAVCNFSM6AAAAABJUERXOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBSGEZTAMBXHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It seems like something may be interfering with your Blazor request pipeline. Try creating a new Blazor project and then following the steps from Blazor.Auth documentation and see if it works for you. Also, I can take a look at your solution if you attach it to this issue. |
Never mind, it's my bad. I had a redirect in the MainLayout. Even though
the page uses a public layout, the main one is referenced in Routes. That's
why it's executed every time.
Frank
…On Fri, Jun 21, 2024 at 1:25 PM Yuriy Durov ***@***.***> wrote:
@franky1017 <https://github.com/franky1017>
It seems like something may be interfering with your Blazor request
pipeline. Try creating a new Blazor project and then following the steps
<https://bitzart.github.io/Blazor.Auth/02.getting-started.html> from
Blazor.Auth documentation and see if it works for you.
Also, I can take a look at your solution if you attach it to this issue.
—
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJETLLNBD74ZKGMTKRFIES3ZIRO2BAVCNFSM6AAAAABJUERXOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTGE2TENJRGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I created a simple page in my BlazorApp (InteractiveAuto) and set it to be public. Here is the simple code:
The page loads briefly with the word "Test" on the page but then redirected to the login page. I couldn't figure out why. Can you provide some guidance as how I can create public pages that do not require authentication/authorization?
By the way, I created these pages in both the server app and the client app, same.
Thanks!
The text was updated successfully, but these errors were encountered: