MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / WaitForCallback

Method WaitForCallback

internal/auth/codex/oauth_server.go:147–156  ·  view source on GitHub ↗

WaitForCallback waits for the OAuth callback with a timeout. It blocks until either an OAuth result is received, an error occurs, or the specified timeout is reached. Parameters: - timeout: The maximum time to wait for the callback Returns: - *OAuthResult: The OAuth result if successful - error: A

(timeout time.Duration)

Source from the content-addressed store, hash-verified

145// - *OAuthResult: The OAuth result if successful
146// - error: An error if the callback times out or an error occurs
147func (s *OAuthServer) WaitForCallback(timeout time.Duration) (*OAuthResult, error) {
148 select {
149 case result := <-s.resultChan:
150 return result, nil
151 case err := <-s.errorChan:
152 return nil, err
153 case <-time.After(timeout):
154 return nil, fmt.Errorf("timeout waiting for OAuth callback")
155 }
156}
157
158// handleCallback handles the OAuth callback endpoint.
159// It extracts the authorization code and state from the callback URL,

Callers 2

LoginMethod · 0.95
LoginMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected