Skip to content

Redis session cookies not supported? #39

@hubbins

Description

@hubbins

It seems only permanent sessions (SESSION_PERMANENT=True) are supported for redis. Looking at the implementation:

       if session.permanent:
            value = self.serializer.dumps(dict(session))
            self.redis.setex(
                name=self.key_prefix + session.sid,
                value=value,
                time=total_seconds(app.permanent_session_lifetime),
            )

This is the only place any values are set in redis.

When attempting to use session cookies (SESSION_PERMANENT=False), upon login this results in a state mismatch error, since the state was not written for later comparison. Session cookies work fine with memcached.

Is there a reason that session cookies are not supported for redis? It seems redis is the only implementation with this logic that checks "session.permanent" before writing a value to the respective cache.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions