Created
February 14, 2021 03:05
-
-
Save mathis-m/a048f6f56d7c14e38baa590bbec677e8 to your computer and use it in GitHub Desktop.
Custom Logout Plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MyLogoutPlugin = () => ({ | |
statePlugins: { | |
auth: { | |
wrapActions: { | |
logout: (internalLogoutAction) => (keys) => { | |
// here, you can run the logout request. | |
console.log("Logout from following securities:", keys) | |
return internalLogoutAction(keys) // don't forget! otherwise, Swagger UI won't logout | |
} | |
} | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment