This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for logging out without an API endpoint (#124)
This is a fix for https://nuxtjs.cmty.io/nuxt-community/auth-module/issues/c90 Setting the `logout` strategy to `false` will effectively mean that logout does nothing (it simple returns). However, when you have a stateless API, and no need to call a logout endpoint, you still want the user to be logged out in the browser (token removed, session reset, that sort of stuff). This change handles that by not returning if the logout option is falsy, but instead only skipping over the networking part. I think this is the behaviour people would expect when they set logout to `false`.
- Loading branch information
Showing 1 changed file with 6 additions and 6 deletions.