diff options
| author | Jeroen Wijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-25 17:32:14 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-25 17:32:14 +0200 |
| commit | b7c58415cd2de0fc9771dc4a49382fc62aefa7e8 (patch) | |
| tree | bb2fd36f5f463da88311ed8b39579c997d4b0233 /internal/oauth.go | |
| parent | ff93737084fb6178fdab4ca4ec62e7a5a951f640 (diff) | |
FSM: Add the ability to run callbacks in a goroutine
Diffstat (limited to 'internal/oauth.go')
| -rw-r--r-- | internal/oauth.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/oauth.go b/internal/oauth.go index 1e728ca..16edd1e 100644 --- a/internal/oauth.go +++ b/internal/oauth.go @@ -260,7 +260,8 @@ func (oauth *OAuth) start(name string, authorizationURL string, tokenURL string) oauthSession := OAuthExchangeSession{ClientID: name, State: state, Verifier: verifier} oauth.TokenURL = tokenURL oauth.Session = oauthSession - oauth.FSM.GoTransitionWithData(OAUTH_STARTED, authURL) + // Run the state callback in the background so that the user can login while we start the callback server + oauth.FSM.GoTransitionWithData(OAUTH_STARTED, authURL, true) return nil } |
