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

httpOnly? #85

Open
bahiamartins opened this issue Nov 21, 2022 · 2 comments
Open

httpOnly? #85

bahiamartins opened this issue Nov 21, 2022 · 2 comments

Comments

@bahiamartins
Copy link

missing httpOnly

@cmp-cc
Copy link
Owner

cmp-cc commented Nov 22, 2022

HttpOnly cannot be set in the browser client side (in JavaScript). there's no API available to get/set the HttpOnly attribute of the cookie, as that would otherwise defeat the meaning of HttpOnly.

see #51

@wshostak
Copy link

In my case I just need to make sure the session exist so I wrote this function;

  methods: {
    doesSessionExist(cookieName) {
      this.$cookies.set(cookieName, 'new_value', '1s')

      return !this.$cookies.get(cookieName)
    }
  }

and call like so this.doesSessionExist('session_cookie_name') if you can set the cookie it does not exist.

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

3 participants