-
-
Notifications
You must be signed in to change notification settings - Fork 582
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
Failure when using with axum-login #580
Comments
So the panic is coming from It looks like they are implementing This is pretty incompatible with the way context works in Leptos: when you I'm going to close this because I don't think it really has anything to do with Leptos, but with the way they've chosen to implement this library. |
I'm not sure what's so surprising about interior mutability, however I do think there are ergonomic problems with this API. There is a reason for this however, so for future readers who stumble upon this: the underlying crate at issue here is |
The pattern I would've expected here, given what you're describing, is something like
It might be useful to document how this is supposed to be done... I can't find any discussion of managing a lock anywhere in the |
Please feel free to open an issue or better yet a PR. |
My project uses axum-login for authentication, but to do this I need to pass
axum_login::extractors::AuthContext
around all server functions for authentication. To do this, I need to make custom handlers:and handle all routes with them:
However, whenever I serve and load a page, my browser will fail to load the page, with this error in the cli:
Unsure what's happening here, is leptos improperly holding onto something when it shouldn't?
The text was updated successfully, but these errors were encountered: