summaryrefslogtreecommitdiff
path: root/src/oauth.go
diff options
context:
space:
mode:
authorJeroen Wijenbergh <jeroenwijenbergh@protonmail.com>2022-04-19 12:56:57 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-04-19 12:56:57 +0200
commit42d2350e4a5d7a5bfb204bdc0994a0c283208fe7 (patch)
treeafa65e83d983c7d5c9015cf480f5155e704c278e /src/oauth.go
parentfb2f57cfcbb6408130e1cc75bd36c896502b78e0 (diff)
Config: Only write on deregister
Diffstat (limited to 'src/oauth.go')
-rw-r--r--src/oauth.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/oauth.go b/src/oauth.go
index eb4e13f..831fa0f 100644
--- a/src/oauth.go
+++ b/src/oauth.go
@@ -292,15 +292,11 @@ func (state *VPNState) LoginOAuth() error {
if oauthErr != nil {
return oauthErr
}
-
- state.WriteConfig()
return nil
}
func (oauth *OAuth) Login() error {
- // FIXME: Find a better way
- state := GetVPNState()
- return state.LoginOAuth()
+ return GetVPNState().LoginOAuth()
}
func (oauth *OAuth) NeedsRelogin() bool {