aboutsummaryrefslogtreecommitdiff
path: root/auth/auth.go
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth.go')
-rw-r--r--auth/auth.go6
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...")