diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-06-16 13:27:25 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-06-16 13:27:25 +0530 |
commit | 0c4f89f08f4fc557323922db238f73dd05d8f3d1 (patch) | |
tree | b667c7aa93cd2c6dfb74c928e6046d9c9635662c /auth/auth.go | |
parent | 0c0f4f31f291fd266f86384da4af1a3755c6e588 (diff) |
deleting refresh token and other details on logout
Diffstat (limited to 'auth/auth.go')
-rw-r--r-- | auth/auth.go | 6 |
1 files changed, 6 insertions, 0 deletions
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("<failed to detect platform>") + 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...") |