Skip to content

What happens when session_auth_hash is empty? #212

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

You must be logged in to vote

I see in the multiAuth example that you return &[] if its no access_token og passwords

In the multi-auth example, that's an unreachable branch (users always have passwords).

For clarity, it would probably be better to update the example to panic instead of returning an empty array (which only there to satisfy the compiler).

For security reasons, you should never use an empty array as the auth hash value.

Replies: 1 comment 1 reply

Comment options

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

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