-
-
Notifications
You must be signed in to change notification settings - Fork 741
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
Example of Hangfire authorization using token from navlink #270
base: master
Are you sure you want to change the base?
Conversation
@@ -115,5 +120,8 @@ | |||
_canViewChat = (await _authorizationService.AuthorizeAsync(_authenticationStateProviderUser, Permissions.Communication.Chat)).Succeeded; | |||
_canViewProducts = (await _authorizationService.AuthorizeAsync(_authenticationStateProviderUser, Permissions.Products.View)).Succeeded; | |||
_canViewBrands = (await _authorizationService.AuthorizeAsync(_authenticationStateProviderUser, Permissions.Brands.View)).Succeeded; | |||
|
|||
_accessToken = await _localStorage.GetItemAsync<string>(StorageConstants.Local.AuthToken); | |||
_jobsLink = $"/jobs?token={_accessToken}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it safe to pass a token in a query string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The token is exposed in the header of any call, so is more or less the same as exposing it in the query string.
Should it validate token before granting access? @nbiada |
I have done it like this
Content of the authfilter
and on client side onclick instead of href
|
No description provided.