_nifectl auth_
Authentication is the foundation of secure interaction with the Nife platform. The auth command group provides comprehensive tools for managing user authentication, access tokens, and identity verification. Whether you're logging in for the first time, managing API tokens, or verifying your identity, these commands ensure secure and seamless access to the Nife platform.
Overview#
Authenticate with Nife (and logout if you need to). The authentication system supports:
- User Login/Logout: Secure credential-based authentication
- Account Creation: New user signup and onboarding
- Token Management: Generate and manage API access tokens
- Identity Verification: Check current authentication status
If you do not have an account, start with the AUTH SIGNUP command. If you already have an account, begin with the AUTH LOGIN subcommand.
nifectl auth#
Main command for authentication management operations.
Usage#
Available Commands#
- login - Log in a user
- logout - Logs out the currently logged in user
- signup - Create a new nife account
- token - Show the current auth token
- whoami - Show the currently authenticated user
Options#
Global Options#
nifectl auth login#
Authenticate with the Nife platform using your credentials.
About#
User can login to the nifectl platform via command prompt or terminal. This command establishes an authenticated session that allows you to interact with all Nife services. The login process:
- Accepts your email and password credentials
- Validates your identity against the Nife platform
- Generates an authentication token
- Stores the token securely for subsequent commands
If you do not have an account, start with the AUTH SIGNUP command first. If you already have an account, begin with the AUTH LOGIN subcommand.
Usage#
Options#
Global Options#
Examples#
Login Methods#
Interactive Login (Recommended)#
The safest method as it prompts for credentials without exposing them in command history:
Command-line Arguments#
Useful for automation but less secure:
Use Cases:
- CI/CD pipelines
- Automated scripts
- Docker containers
- Testing environments
โ ๏ธ Security Warning: Avoid using passwords in command line for production environments. Use environment variables or secure secret management instead.
Secure Authentication Best Practices#
Use Interactive Mode for manual logins
Environment Variables for automation
Access Tokens for CI/CD
Token-based Authentication for long-running processes
Session Management#
After successful login:
- Token is stored locally in
~/.nife/config.yml - Subsequent commands use this token automatically
- Session persists until logout or token expiration
- No need to login again for each command
Troubleshooting Login Issues#
Problem: "Invalid credentials"
- Solution: Verify email and password are correct
- Solution: Check if account is active
- Solution: Reset password if forgotten
Problem: "Network error"
- Solution: Check internet connection
- Solution: Verify firewall isn't blocking API access
- Solution: Check platform status at status.nife.io
Problem: "Account locked"
- Solution: Contact support to unlock account
- Solution: Wait for automatic unlock (if temporary)
- Solution: Verify account hasn't been suspended
Problem: "Two-factor authentication required"
- Solution: Complete 2FA setup in web dashboard
- Solution: Use backup codes if available
- Solution: Contact support for 2FA reset
nifectl auth logout#
End your authenticated session and clear stored credentials.
About#
Log the currently logged-in user out of the nifectl platform. This command:
- Invalidates the current authentication token
- Removes stored credentials from local configuration
- Ends the authenticated session
- Requires fresh login for future commands
To continue interacting with nifectl after logout, you will need to log in again using nifectl auth login.
Usage#
Options#
Global Options#
Examples#
What Happens During Logout#
- Token Invalidation: Current auth token is revoked
- Local Cleanup: Config files are cleared of credentials
- Session End: API access is terminated
- Confirmation: Success message displayed
After Logging Out#
- โ All nifectl commands requiring auth will fail
- โ Cannot access organization resources
- โ Cannot deploy or manage applications
- โ Can still use public commands (version, docs)
- โ Can create a new account or login again
nifectl auth signup#
Create a new Nife platform account.
About#
Create a new nife account. The command opens your default web browser and directs you to a registration form where you provide:
- Email address
- Password
- Organization name (optional)
- Account preferences
After completing the form, your account is created and you can immediately login using nifectl auth login.
Usage#
Options#
Global Options#
Examples#
Signup Process#
- Command Execution: Run
nifectl auth signup - Browser Opens: Default browser launches with signup form
- Form Completion: Enter required information
- Email Verification: Verify email address (if required)
- Account Creation: Account is created and activated
- First Login: Use
nifectl auth loginto authenticate
Account Requirements#
Email Address:
- โ Valid email format
- โ Unique (not already registered)
- โ Accessible for verification
- โ Professional or personal domain accepted
Password:
- โ Minimum 8 characters
- โ Mix of uppercase and lowercase
- โ At least one number
- โ Special characters recommended
- โ Not a commonly used password
Organization Name:
- Optional during signup
- Can be created later
- Used for team collaboration
- Determines billing structure
After Creating Account#
nifectl auth token#
Display and manage authentication tokens.
About#
Shows the authentication token that is currently in use. This token can be used as an authentication token with API services, independent of nifectl. Tokens are useful for:
- API Integration: Direct API access without CLI
- CI/CD Pipelines: Automated deployments
- Third-party Tools: Integration with other services
- Programmatic Access: Script-based automation
Tokens can be generated with custom expiry times, allowing you to create short-lived tokens for security or long-lived tokens for continuous integration.
Usage#
Options#
Global Options#
Examples#
Token Expiry Time Options#
You can specify expiry time in hours (h) or days (d):