From b7c58415cd2de0fc9771dc4a49382fc62aefa7e8 Mon Sep 17 00:00:00 2001 From: Jeroen Wijenbergh Date: Mon, 25 Apr 2022 17:32:14 +0200 Subject: FSM: Add the ability to run callbacks in a goroutine --- internal/oauth.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/oauth.go') 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 } -- cgit v1.2.3