Skip to content

zaker/oauth2local

Repository files navigation

Build Status

oauth2local

An oauth client providing authenticated tokens to local processes.

oauth2local is providing oauth2 authenticated tokens to local processes

Usage:
  oauth2local [command]

Available Commands:
  callback    Send callback url to sovereign
  defaults    Writes default config values to config file
  help        Help about any command
  register    Register app as url handler for custom url
  serve       serve a local auth provider
  token       Gets access token from the local server instance

Flags:
      --config string   config file (default is $HOME/.oauth2local.yaml)
  -h, --help            help for oauth2local
      --verbose         log to console to console

Use "oauth2local [command] --help" for more information about a command.

How to setup

Running the command should register the application as a custom url handler for "loc-auth://"

oauth2local register

this may need administrative privileges on windows

To test if the registration is successfull, run this command and see if there is a response from the server

oaut2local serve && xdg-open loc-auth://callback?code=foo

Getting a token when the server is up and running

oaut2local token

Build from source

Dependencies

  • Go >=v1.19
  • Protoc >=v3.7

Generate GRPC server/client

protoc --go_out=ipc/localauth --go_opt=paths=source_relative --go-grpc_out=ipc/localauth --go-grpc_opt=paths=source_relative .\ipc\locauth.proto

Build

go build -v .

About

An oauth client providing authenticated tokens to local processes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages