Commit 6189c6d
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`.1 parent 554a042 commit 6189c6d
1 file changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
0 commit comments