-
Notifications
You must be signed in to change notification settings - Fork 69
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
Issue getting user identity in OnAuthorizedAsync's eventContext #140
Comments
Hi, Without seeing the rest of your authentication setup I think this is similar to this issue here: #137 (comment) Have you configured a default authentication schema? If not, you should be able to challenge the request (and thus get the User identity) using AuthenticationHttpContextExtensions.ChallengeAsync . Please let me know if any of this solved the issue. In a future version tusdotnet will integrate with endpoint routing making all of this easier. |
ChallengeAsync didn't seem to work for me, though I could have been misusing it somehow. |
Oops I linked you the wrong method. Sorry about that! Glad you solved it :) I'l update the docs to make this clearer. |
Hi. In my razor pages application that uses built in Identity authentication, I'm finding that I'm unable to check the identity of the current user in the eventContext for OnAuthorizedAsync. Here is the relevant configuration
The HttpContext seems to contain the identity of the logged in user in other xhr requests, as long as that HttpContext is accessed through the PageModel. I've inspected and compared such non-tus xhr requests to the tus xhr requests, and as far as I can tell they look exactly the same where it is relevant: same cookies, headers, both contain the request verification token. So I'm struggling to understand why HttpContext in the useTus configuration doesn't contain user Identity. Thanks in advance for clearing this up for me.
The text was updated successfully, but these errors were encountered: