Skip to content

remove from cookies does not work for me #58

Open

Description

@alexander-elgin
No description provided.

Activity

  1. guillaumepotier commented on Sep 27, 2019

    @guillaumepotier
    Member

    Hum,

    this is really strange since we're using basil on production for years now on Wisembly and cookies are correctly removed when a signed in users logs out.

    Please, would you mind sharing with us an example of what you're saying?

    Thx

  2. alexander-elgin commented on Sep 27, 2019

    @alexander-elgin
    Author

    That's how I use it

    import Basil from 'basil.js';
    
    const BASIC_STORAGE_NAME = 'CURRENT_USER';
    const TOKEN_STORAGE_NAME = 'TOKEN';
    
    const basil = new Basil({
      storages: ['cookie'],
      namespace: BASIC_STORAGE_NAME,
    });
    
    export function getToken() {
      return basil.get(TOKEN_STORAGE_NAME);
    }
    
    export function setToken(token) {
      basil.set(TOKEN_STORAGE_NAME, token);
    }
    
    export function signOut() {
      basil.remove(TOKEN_STORAGE_NAME);
    }
    

    on Chrome Chrome 76, Ubuntu 16.04 OS (64 bit)

  3. guillaumepotier commented on Sep 27, 2019

    @guillaumepotier
    Member

    Ok,

    Your class seems ok so far.

    Please, could you use https://jsfiddle.net/ to create a snippet showing the bug please?

    Best

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