Command

nylas auth logout

Revoke the current authentication.

Written by Qasim Muhammad Staff SRE

What does nylas auth logout do?

The nylas auth logout command revokes the currently active authentication. It takes no grant argument — to act on a different account, switch to it first with nylas auth switch, or use nylas auth remove <grant-id> to drop a stored grant from local config.

Usage

nylas auth logout

Flags

FlagDescription
--jsonOutput as JSON
--no-colorDisable color output
--verbose(-v)Enable verbose output
--configCustom config file path
--help(-h)Show help for the command
--limitLimit results (most list commands)
--yes(-y)Skip confirmations

Examples

The nylas auth logout command revokes the currently active authentication.

Log out of the active account

nylas auth logout

Switch to another account, then log it out

nylas auth switch user@example.com && nylas auth logout

Example output

Revoking current authentication...

✓ Grant grant_abc123 revoked
✓ alice@example.com signed out
✓ Local credentials cleared

Troubleshooting

Logout has no effect — commands still work

Check whether NYLAS_API_KEY is set in your environment. Environment variables override local config.

Grant ID not found

Run nylas auth list to see valid grant IDs. Grant IDs are case-sensitive UUIDs.

Recommended guides

Run nylas auth logout --help for full help output.