How To Decode Django Sessions in PostgreSQL

Written by arctype | Published 2021/03/20
Tech Story Tags: django | web-development | session-management | security | postgres | good-company | django-postgresql | django-session

TLDR How To Decode Django Sessions in Postgres is easy to do with Postgres. Django's default Django session backend stores persistent session data. The user_id is fetched from the decoded session data, the built-in User object is populated based on the stored data. Fortunately, we can easily base64 decode the data using Postgres' base64 encoding. We need to convert from binary data into text, using the "encode" function to extract all characters at the end of a string.via the TL;DR App

no story

Written by arctype | The collaborative SQL client for developers and teams
Published by HackerNoon on 2021/03/20