Skip to content

Extension of user in AuthSession #139

Answered by maxcountryman
seblj asked this question in Q&A
Discussion options

You must be logged in to vote

We removed the User extension because it seemed redundant with the session.

If you feel like it simplifies your code, you could write something like this instead:

pub fn home(AuthSession { user, ... }: AuthSession) -> impl IntoResponse {
    todo!();
}

I don't think we're opposed to adding the extension again, but it's not clear it's really needed.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@seblj
Comment options

Answer selected by seblj
Comment options

You must be logged in to vote
1 reply
@maxcountryman
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants