auth/views: Fix encrypted token retrieval with PostreSQL backend
When using the PostgreSQL backend for django database, models.BinaryField
colums are typed to memoryview
while they are typed to bytes
with
SQLite backend.
So handle both token types to fix errors in production since the move to PostgreSQL backend.
Migrated from D5407 (view on Phabricator)