auth/views: Fix encrypted token retrieval with PostreSQL backend
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.

SoftwareHeritage/swh-web-ui,SoftwareHeritage/swh-web-ui,SoftwareHeritage/swh-web-ui