How to use the quasar.Cookies.set function in quasar

To help you get started, we’ve selected a few quasar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rmetcalf9 / dockJob / webfrontend / src / store / basicauthlogintogetjwttoken.js View on Github external
(response) => {
        commit('SET_TOKEN', response.data)
        // Not adding expire to the cookie as we are making it a session cookie
        //  expire can ounly be quoted in days
        Cookies.set(state.authmethod.cookiename, state.token.JWTToken, {secure: true, path: '/'})
        params.callback.ok(response)
      },
      (response) => {
github rmetcalf9 / dockJob / webfrontend / src / store / basicauthlogintogetjwttoken.js View on Github external
logout ({commit, state, dispatch}, params) {
    if (isCookieSetFN()) {
      // Note- remove cookie not working so we settle for blanking out the value and setting it to expire
      Cookies.set(state.authmethod.cookiename, 'X', {secure: true, path: '/', expire: -1})
      Cookies.set(state.authmethod.cookiename, '', {secure: true, path: '/', expire: -1})
      Cookies.remove(state.authmethod.cookiename)
    }
    commit('SET_TOKEN', undefined)
    params.callback.ok(undefined)
  },
  getJWT ({commit, state, dispatch}, params) {
github rmetcalf9 / dockJob / webfrontend / src / store / basicauthlogintogetjwttoken.js View on Github external
logout ({commit, state, dispatch}, params) {
    if (isCookieSetFN()) {
      // Note- remove cookie not working so we settle for blanking out the value and setting it to expire
      Cookies.set(state.authmethod.cookiename, 'X', {secure: true, path: '/', expire: -1})
      Cookies.set(state.authmethod.cookiename, '', {secure: true, path: '/', expire: -1})
      Cookies.remove(state.authmethod.cookiename)
    }
    commit('SET_TOKEN', undefined)
    params.callback.ok(undefined)
  },
  getJWT ({commit, state, dispatch}, params) {
github briancaffey / django-postgres-vue-gitlab-ecs / quasar / src / store / auth / index.js View on Github external
.then(resp => {
          Cookies.set("user-token", resp.data.access);
          commit(AUTH_SUCCESS, resp);
        });
    })
github briancaffey / django-postgres-vue-gitlab-ecs / quasar / src / store / auth / index.js View on Github external
.then(resp => {
          Cookies.set("refresh-token", resp.data.refresh);
          Cookies.set("user-token", resp.data.access);
          commit(AUTH_SUCCESS, resp);
          dispatch(USER_REQUEST);
          resolve(resp);
        })
        .catch(err => {
github quasarframework / quasar / docs / src / boot / gdpr.js View on Github external
handler () {
          Cookies.set('gdpr', true, { expires: 5 * 365 })
        }
      },
github briancaffey / django-postgres-vue-gitlab-ecs / quasar / src / store / auth / gqljwt.js View on Github external
authSuccess: (state, payload) => {
    Cookies.set("user-token-gql", payload.tokenAuth.token);
    state.token = payload.tokenAuth.token;
  },
};