login

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChooseAuthMethod

func ChooseAuthMethod() (string, error)

func ExistingToken

func ExistingToken() error

func GuardEnvToken added in v1.2.0

func GuardEnvToken() error

GuardEnvToken refuses a login when a token environment variable is set. Every login path writes to the config file, but Resolve() prefers the environment — so the write would be dead on arrival. Previously these paths verified the pasted token, skipped the save, and still printed "Authenticated as ...", which is why a user with a stale VC_TOKEN could log in repeatedly and never change anything.

Callers must invoke this *before* prompting, so the user isn't asked to paste a token or complete a browser flow that is going to be discarded.

func SaveToken

func SaveToken(token string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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