Skip to content

user.cookie.oldKey setting doesn't do anything#1324

Description

@e1himself

Hello 馃憢

I've noticed this problem when I needed to migrate client-side tracking from one cookie name to another one. It doesn't work.

There is cookie.oldKey settings parameter available for the User module:

cookie?: {
key?: string
oldKey?: string
}

But, it seems, it doesn't do anything. In both cases, when the code checks for "old" data stored with the "old key", it uses defaults.cookie.oldKey (which is a module-level static const) instead of options.cookie.oldKey.

See:

const retLeg = this.legacyUserStore.get(defaults.cookie.oldKey)

const legacyUser = this.legacyUserStore.get(defaults.cookie.oldKey)

I'll be happy to provide a PR to fix it, if anyone confirms this is indeed a bug and not a feature :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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