Quickstart guide seems to be wrong about `deprecated` param to CryptContext

Issue #102 new
Josh Holland created an issue

This is the suggested setup in the New Application Quickstart Guide:

pwd_context = CryptContext(
    # ...
    # Automatically mark all but first hasher in list as deprecated.
    # (this will be the default in Passlib 2.0)
    deprecated="auto",
    # ...
    )

but the code uses this check:

if 'auto' in value:

suggesting that the docs should actually say to use deprecated=["auto"].

Interestingly, I've been passing deprecated="auto", which hasn't caused any errors but presumably also doesn't do the right thing – I only ran into this when starting to do some type-checking, and trying to work out what types the CryptContext's arguments are.

Comments (0)

  1. Log in to comment