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

MyOrders Component Authorization process #366

Open
NewHeight opened this issue Nov 3, 2023 · 2 comments
Open

MyOrders Component Authorization process #366

NewHeight opened this issue Nov 3, 2023 · 2 comments

Comments

@NewHeight
Copy link

NewHeight commented Nov 3, 2023

Since /myorders was not decorated with [Authorize] Attribute.
So I think, type /myorders page in browser address bar, this page will acess the /orders api, then get 401 , the blazor redirect to login page.
But I haven't seen the /orders api request in network panel.
So what's the real authorization process of the page for /myorders ?

@dotnetspark
Copy link
Contributor

This is the intended behavior. The attribute will execute first and if authenticated will continue to the component. Since you're not authenticated it redirects you to the login page

@NewHeight
Copy link
Author

I follow the steps in Session #6, and I did not add [Authorize] Attribute to "/myorders" page. But if I access this page, it still redirect to login page.
So I'm wondering what is working with the redirect?

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

2 participants