Open jawa-the-hutt opened 2 years ago
Hmm, not quite sure what you're trying to achieve now, if you want to pass a function I think it should be like this.
if (typeof val === 'string') {
return val;
}
else if (typeof val === 'function') {
return val();
}
Otherwise it will just return a function. But not sure if you're having something else in mind?
With this PR, you can now update the cookie expiration dynamically based on a function call. Addresses https://github.com/websanova/vue-auth/issues/669
Cookie can be setup as such: