Help us shape the future of Go! Take the 2026 Go Developer Survey

oauthcallback

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForCallback

func WaitForCallback(ctx context.Context, expectedState string, listener net.Listener, listenAddr string) (string, error)

WaitForCallback starts a local HTTP server on listener and waits for an OAuth callback. It returns the authorization code from the callback.

If listener is nil, one is created on listenAddr. Passing a pre-bound listener (e.g., from net.Listen("tcp", "127.0.0.1:0")) is preferred for tests to avoid port conflicts.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL