loginhelper

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const CallbackCommand = "_callback"

CallbackCommand 是 desktop protocol handler 调回当前 CLI binary 的隐藏入口名。 它只由本包生成的系统关联使用,不是公开 CLI 命令。

Variables

This section is empty.

Functions

func CallbackRelayURL added in v0.6.0

func CallbackRelayURL(callbackURL string) (string, error)

CallbackRelayURL 将系统交给 handler 的 pixiv:// URL 放入 bridge fragment。 fragment 不会进入 loopback GET 或浏览器历史;bridge 页面会在 POST ��清除它。

func Install

func Install(ctx context.Context, callbackRelayURL string) (cleanup func(), err error)

Install 在桌面 Linux 上只为当前 auth login 尝试注册 pixiv:// handler。 xdg-mime 会写入用户 mimeapps 文件,因此在修改前保留所有可能的用户级位置并在 cleanup 时逐字节恢复,避免没有原默认 handler 的用户留下悬挂关联。

Types

This section is empty.

Jump to

Keyboard shortcuts

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