Logo
Getting Started
Overview

Getting Started

Initialize config, register an account, start daemon, and fetch tokens.

1 min read
Install OAuth2 Setup

Install

Arch Linux (AUR)

Terminal window
yay -S vygrant
# or
paru -S vygrant

Build from source

Terminal window
git clone https://github.com/vybraan/vygrant.git
cd vygrant
go build -ldflags "-s -w"

Initialize Config

Terminal window
vygrant init

Default config path:

  • ~/.config/vybr/vygrant.toml

Custom config path:

  • set VYGRANT_CONFIG=/path/to/vygrant.toml

Add an Account

Example account block:

https_listen = "8080"
http_listen = "none"
persist_tokens = true
token_event_cmd = ""
[account.myapp]
auth_uri = "https://provider.com/auth"
token_uri = "https://provider.com/token"
client_id = "YOUR_CLIENT_ID"
client_secret = "YOUR_CLIENT_SECRET"
redirect_uri = "https://localhost:8080"
scopes = ["openid", "profile", "email"]

Start Daemon

Terminal window
vygrant server

Authenticate and Fetch Token

Terminal window
vygrant token refresh myapp
vygrant token get myapp

If refresh token is missing, Vygrant prints an auth URL to open in browser.