Authentication¶
NEMAR uses API key authentication with an admin approval workflow.
Workflow Overview¶
- Sign up - Create an account with your details
- Verify email - Click the link in the verification email
- Wait for approval - Admin reviews your request
- Retrieve API key - Use
nemar auth retrieve-keywith your email and password - Log in - Use your API key to authenticate
Creating an Account¶
You'll be prompted for:
| Field | Description |
|---|---|
| Username | 3-30 characters, alphanumeric with - and _ |
| Valid email for verification | |
| Password | Minimum 12 characters |
| GitHub Username | Required for PR collaboration |
| ORCID iD | Optional, used for DOI creator metadata |
| Description | Why you need NEMAR access (min 20 chars) |
Logging In¶
Interactive¶
With API Key¶
Environment Variable¶
Check Status¶
Log Out¶
Switch Accounts¶
If you have multiple NEMAR accounts:
# Interactive account picker
nemar auth switch
# Switch to a specific account
nemar auth switch <username>
Resend Verification Email¶
If you didn't receive the verification email:
Security Notes¶
Keep Your API Key Secure
- Never commit your API key to version control
- Use environment variables in scripts
- Don't share your API key with others
Your API key is linked to: - Your GitHub Personal Access Token (for repository operations) - Your S3 credentials (for data upload/download)
If you suspect your key is compromised, regenerate it immediately:
This sends a verification email and revokes the old key upon confirmation.