Overview
LiteClient supports OAuth 2.0 authentication with three grant types. Tokens are automatically acquired, cached in VS Code’s SecretStorage, and injected into requests.Supported Grant Types
LiteClient supports three OAuth 2.0 flows:Authorization Code
Traditional flow requiring user login via browser
PKCE
Enhanced security for public clients without client secret
Client Credentials
Machine-to-machine authentication with direct token exchange
Authorization Code Flow
Use this flow when your application needs to authenticate on behalf of a user.Configure Endpoints
Enter the following URLs:
- Authorization URL: The endpoint where users log in
- Token URL: The endpoint that exchanges the code for a token
Enter Credentials
Provide:
- Client ID: Your application’s client identifier
- Client Secret: Your application’s secret key
Get Access Token
Click Get Access Token. LiteClient will:
- Open your default browser
- Navigate to the authorization URL
- Wait for you to log in and authorize
- Receive the callback with authorization code
- Exchange the code for an access token
LiteClient handles the OAuth callback by registering a URI handler in VS Code.
Authorization Code with PKCE
PKCE (Proof Key for Code Exchange) provides enhanced security for public clients that cannot securely store a client secret.Configure Endpoints
Enter:
- Authorization URL: The authorization endpoint
- Token URL: The token exchange endpoint
Client Credentials Flow
Use this flow for server-to-server authentication without user interaction.Enter Credentials
Provide:
- Client ID: Your application identifier
- Client Secret: Your application secret
Token Management
Token Storage
LiteClient stores OAuth tokens securely:- Tokens are saved in VS Code’s SecretStorage
- Tokens persist across VS Code sessions
- Tokens are encrypted and never exposed in plain text
Token Refresh
LiteClient automatically refreshes expired tokens when possible. If refresh fails, re-authenticate via the Auth tab.
Manual Re-authentication
If your token expires or becomes invalid:- Open the request’s Auth tab
- Verify the OAuth configuration (URLs, Client ID, Secret)
- Click Get Access Token to acquire a new token
Common OAuth Providers
Configuration examples for popular OAuth providers:GitHub
GitHub
- Authorization URL:
https://github.com/login/oauth/authorize - Token URL:
https://github.com/login/oauth/access_token - Grant Type: Authorization Code or PKCE
- Scopes:
repo,user,read:org, etc.
Google
- Authorization URL:
https://accounts.google.com/o/oauth2/v2/auth - Token URL:
https://oauth2.googleapis.com/token - Grant Type: Authorization Code or PKCE
- Scopes:
https://www.googleapis.com/auth/userinfo.email, etc.
Microsoft
Microsoft
- Authorization URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize - Token URL:
https://login.microsoftonline.com/common/oauth2/v2.0/token - Grant Type: Authorization Code or PKCE
- Scopes:
User.Read,Mail.Read, etc.
Troubleshooting
Token Not Being Sent
Token Not Being Sent
- Verify OAuth 2.0 is selected in the Auth tab
- Confirm you clicked Get Access Token and received a token
- Check that the token URL is correct
Browser Callback Fails
Browser Callback Fails
- Ensure your OAuth application’s redirect URI includes:
vscode://liteclienthq.liteclient/oauth-callback
- Check that VS Code is set as the default handler for
vscode://URIs
Token Expired
Token Expired
- LiteClient automatically refreshes tokens when possible
- If refresh fails, manually re-authenticate via the Auth tab
- Verify the token URL is correct