{"action":"closed","issue":{"url":"https://api.github.com/repos/ueberauth/guardian_db/issues/88","repository_url":"https://api.github.com/repos/ueberauth/guardian_db","labels_url":"https://api.github.com/repos/ueberauth/guardian_db/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/ueberauth/guardian_db/issues/88/comments","events_url":"https://api.github.com/repos/ueberauth/guardian_db/issues/88/events","html_url":"https://github.com/ueberauth/guardian_db/issues/88","id":311123031,"node_id":"MDU6SXNzdWUzMTExMjMwMzE=","number":88,"title":"Tokens are not revoked","user":{"login":"bcat-eu","id":2310110,"node_id":"MDQ6VXNlcjIzMTAxMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/2310110?v=4","gravatar_id":"","url":"https://api.github.com/users/bcat-eu","html_url":"https://github.com/bcat-eu","followers_url":"https://api.github.com/users/bcat-eu/followers","following_url":"https://api.github.com/users/bcat-eu/following{/other_user}","gists_url":"https://api.github.com/users/bcat-eu/gists{/gist_id}","starred_url":"https://api.github.com/users/bcat-eu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcat-eu/subscriptions","organizations_url":"https://api.github.com/users/bcat-eu/orgs","repos_url":"https://api.github.com/users/bcat-eu/repos","events_url":"https://api.github.com/users/bcat-eu/events{/privacy}","received_events_url":"https://api.github.com/users/bcat-eu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-04T07:57:34Z","updated_at":"2018-06-22T09:14:02Z","closed_at":"2018-06-22T09:14:02Z","author_association":"CONTRIBUTOR","body":"My `on_revoke` callback just rests there and is never called when user is signed out (Guardian's `sign_out` is called). I ended up switching to before_sign_out callback to get the logouts working:\r\n\r\n```\r\n  def before_sign_out(conn, location, _options) do\r\n    claims = __MODULE__.Plug.current_claims(conn, key: location)\r\n    token = __MODULE__.Plug.current_token(conn, key: location)\r\n\r\n    if claims && token do\r\n      with {:ok, _} <- Guardian.DB.on_revoke(claims, token) do\r\n        {:ok, conn}\r\n      end\r\n    end\r\n\r\n    {:ok, conn}\r\n  end\r\n```\r\n\r\nThis might be a Guardian issue since they state that sign_out will \"remove from session (if fetched) and revoke the token\", but in any case the current setup as described in readme doesn't seem to work.\r\n\r\nAlso as mentioned in #87 `on_refresh` callback as described triggers warning, there is really no such function yet (it is in the repository but is not released)."}}
{"actor":{"display_login":"bcat-eu"}}