Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove from cookies does not work for me #58

Open
alexander-elgin opened this issue Sep 27, 2019 · 3 comments
Open

remove from cookies does not work for me #58

alexander-elgin opened this issue Sep 27, 2019 · 3 comments

Comments

@alexander-elgin
Copy link

No description provided.

@guillaumepotier
Copy link
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

@alexander-elgin
Copy link
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)

@guillaumepotier
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants