Authenticating with your Weni by VTEX account
Learn how to authenticate with Weni by VTEX CLI.
Authentication
Learn how to authenticate with Weni by VTEX CLI and manage your credentials.
Login Process
Weni by VTEX CLI uses OAuth2 for authentication. When you run the login command:
_10weni login
The following happens:
- A local web server starts on your machine
- Your default browser opens to the Weni by VTEX login page
- After successful login, you're redirected back to the local server
- The CLI receives and stores your authentication token
By default, the local server listens on http://localhost:50051/sso-callback.
Token Storage
Your authentication token is stored securely in your home directory. Never share or expose your authentication information.
Token Refresh
If an API request returns an authentication error, the CLI will prompt you to log in again. Run weni login to obtain a new token or to authenticate with a different account.
Logout
To log out and remove your authentication:
- Delete your configuration file
Then, run weni login again to authenticate with different credentials
Troubleshooting
Common Issues
-
Browser Doesn't Open
- Use the URL displayed in the terminal
- Check if you have a default browser configured
-
Authentication Failures
- Verify your internet connection
- Check if your account has the necessary permissions
Security Best Practices
-
Keep Your Token Safe
- Don't share your configuration file
- Use appropriate file permissions
- Don't expose the token in scripts or logs
-
Regular Authentication Checks
- Periodically verify your authentication status
- Update your credentials if you suspect any security issues