auth

package
v0.6.16 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package auth implements the `supermodel login` and `supermodel logout` commands. It handles GitHub OAuth, API key retrieval, and secure token storage in the user's config file.

This is a vertical slice. It must not import any other slice package. It may import from the shared kernel: internal/api, internal/cache, internal/config, internal/ui, internal/build.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(ctx context.Context) error

Login runs the browser-based login flow. Opens the dashboard to create an API key, receives it via localhost callback, validates, and saves it. Falls back to manual paste if the browser flow fails.

func LoginWithToken added in v0.3.1

func LoginWithToken(token string) error

LoginWithToken saves an API key directly (for CI/headless use).

func Logout

func Logout(_ context.Context) error

Logout removes the API key from the config file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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