From 0c4f89f08f4fc557323922db238f73dd05d8f3d1 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Thu, 16 Jun 2022 13:27:25 +0530 Subject: deleting refresh token and other details on logout --- auth/auth.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'auth') diff --git a/auth/auth.go b/auth/auth.go index 95ccd48..05b4b6a 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -61,12 +61,16 @@ func openInBrowser(url string) { switch runtime.GOOS { case "linux": err = exec.Command("xdg-open", url).Start() + break case "windows": err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start() + break case "darwin": err = exec.Command("open", url).Start() + break default: err = errors.New("") + break } if err != nil { @@ -78,6 +82,8 @@ func openInBrowser(url string) { func Logout() { deleteToken() + deleteExpiresIn() + deleteRefreshToken() fmt.Println("Deleted user credentials.") if confirmInput("Delete your Client ID? [y/N] ") { fmt.Println("Deleting Client ID...") -- cgit v1.2.3