Home / Companies / WorkOS / Blog / Post Details
Content Deep Dive

Authenticate CLI tools seamlessly with OAuth Device Flow

Blog post from WorkOS

Post Details
Company
Date Published
Author
Eric Roberts
Word Count
496
Language
English
Hacker News Points
-
Summary

AuthKit has launched CLI Authentication, incorporating the OAuth 2.0 Device Authorization Grant Flow for hosted AuthKit customers without additional cost. This feature addresses the challenge of securely authenticating command-line applications by allowing users to authenticate through a familiar flow similar to logging into streaming apps on TVs. Users run a command in their terminal, receive a code and URL, authenticate via their browser, and receive immediate authorization for their CLI tool. This process eliminates the need for storing long API keys or insecure credentials, enhancing security by avoiding long-lived credentials on disk and allowing users to revoke access through standard session management. It supports all existing AuthKit security features, such as multi-factor authentication and single sign-on. CLI Auth is automatically available for hosted AuthKit customers, with no additional configuration required, and detailed documentation is provided for implementation.