We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36a9112 commit 316aac7Copy full SHA for 316aac7
lib/pow/plug/session.ex
@@ -195,12 +195,17 @@ defmodule Pow.Plug.Session do
195
@impl true
196
@spec delete(Conn.t(), Config.t()) :: Conn.t()
197
def delete(conn, config) do
198
- key = client_store_fetch(conn, config)
199
- {store, store_config} = store(config)
+ case client_store_fetch(conn, config) do
+ nil ->
200
+ conn
201
- store.delete(store_config, key)
202
+ key ->
203
+ {store, store_config} = store(config)
204
- client_store_delete(conn, config)
205
+ store.delete(store_config, key)
206
+
207
+ client_store_delete(conn, config)
208
+ end
209
end
210
211
# TODO: Remove by 1.1.0
0 commit comments