auth

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenBrowser

func OpenBrowser(url string) error

OpenBrowser opens a URL in the user's default browser. The three exec.Command calls below are #nosec G204. exec.Command does not go through a shell, so metacharacters in url cannot inject; the program name is a literal in every branch and only the argument varies. url is the OAuth callback address this process just built, not caller input.

func StartCallbackServer

func StartCallbackServer(ctx context.Context) (port int, result <-chan CallbackResult, err error)

StartCallbackServer starts a local HTTP server that waits for the dashboard to redirect back with an API key.

Types

type CallbackResult

type CallbackResult struct {
	APIKey string
	Error  error
}

CallbackResult holds the API key received from the browser auth flow.

Jump to

Keyboard shortcuts

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