Skip to content

Add a server-side reset() method to end an identified session server-side #88

@JPustkuchen

Description

@JPustkuchen

When a user logs out, his identified session should end. This is well implemented in JS: https://posthog.com/docs/product-analytics/identify#reset

Sadly it's not yet available server-side, while it would be a great (and the best) place to do that.
Typically the validated log-out is handled server-side, ending the user session. We should then be able to also reset the session server-side, using the $distinctId parameter.

Something like this:

    /**
     * End the identified session.
     *
     * @param string $distinctId
     * @param bool $resetDeviceId
     * @return bool whether the reset call succeeded
     */
    public function reset(string $distinctId, bool $resetDeviceId)
    {
        return $this->consumer->reset($distinctId, $resetDeviceId);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions