Skip to content

CookieStorage: reading from state after modifying it returns previous state #67

@dakur

Description

@dakur

Version: 3.1.5

Bug Description

State change is not propagated.

Steps To Reproduce

security:
    authentication:
        storage: cookie
$this->userStorage->saveAuthentication(new SimpleIdentity('abc'));
[$isAuthenticated, $identity] = $this->userStorage->getState();

Expected Behavior

  • $isAuthenticated should be true, but is false
  • $identity should be SimpleIdentity('abc'), but is null

Possible Solution

Cache identity in saveAuthentication() and return it in getState() before touching request cookie.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions