added logout functions

This commit is contained in:
2024-08-15 16:16:40 -04:00
parent 0ae1e4cb7d
commit 90b68b717a
5 changed files with 79 additions and 5 deletions

View File

@ -193,3 +193,17 @@ func (a *App) GetSimklLoggedInUser() SimklUser {
return user
}
func (a *App) LogoutSimkl() string {
if (SimklJWT{} != simklJwt) {
err := simklRing.Remove("SimklTokenType")
err = simklRing.Remove("SimklAccessToken")
err = simklRing.Remove("SimklScope")
if err != nil {
fmt.Println("Simkl Logout Failed", err)
}
}
return "Simkl Logged Out Successfully"
}