MCPcopy Index your code
hub / github.com/github/github-mcp-server / fallBackToUserAction

Method fallBackToUserAction

internal/oauth/manager.go:233–247  ·  view source on GitHub ↗

fallBackToUserAction promotes a running secure flow to the manual user-action channel after its prompt could not be delivered. The background flow keeps running, so the user can complete authorization out of band and retry. It is a no-op if the flow has already resolved.

(ua *UserAction)

Source from the content-addressed store, hash-verified

231// running, so the user can complete authorization out of band and retry. It is a
232// no-op if the flow has already resolved.
233func (m *Manager) fallBackToUserAction(ua *UserAction) {
234 m.mu.Lock()
235 defer m.mu.Unlock()
236 if m.status != statusInProgress {
237 return
238 }
239 m.status = statusAwaitingUser
240 m.pending = ua
241 // Wake any callers joined on this flow so they receive the action, and clear
242 // done so complete() does not double-close it when run() later finishes.
243 if m.done != nil {
244 close(m.done)
245 m.done = nil
246 }
247}
248
249// complete records the flow result, installing a refreshing token source on
250// success, and wakes any joined callers.

Callers 1

runFlowMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected