OneAuth User Guide
This guide explains how to use applications that implement OneAuth for authentication. OneAuth provides a secure way to create accounts and sign...
Source: docs/USER_GUIDE.md
OneAuth User Guide ¶
Introduction ¶
This guide explains how to use applications that implement OneAuth for authentication. OneAuth provides a secure way to create accounts and sign in using passwords or social login providers.
Creating an Account ¶
With Email and Password ¶
- Navigate to the signup page
- Enter your desired username (3-20 characters, letters, numbers, underscores, and hyphens)
- Enter your email address
- Create a password (minimum 8 characters)
- Click “Sign Up”
Some applications may send a verification email. Check your inbox and click the verification link to activate your account.
With Social Login ¶
If enabled by the application:
- Navigate to the login page
- Click “Continue with Google” or “Continue with GitHub”
- Authorize the application in the provider’s window
- You’ll be redirected back and logged in automatically
Your email from the social provider becomes your identity in the application.
Signing In ¶
With Password ¶
- Navigate to the login page
- Enter your email address or username
- Enter your password
- Click “Sign In”
With Social Login ¶
- Navigate to the login page
- Click your preferred social login button
- Authorize if prompted
- You’ll be signed in automatically
Multiple Authentication Methods ¶
OneAuth allows you to use multiple ways to sign into the same account:
- Sign up with email and password
- Later, sign in with Google using the same email
- Both methods access the same account and data
This provides flexibility while keeping your account unified.
Linking Additional Login Methods ¶
If you signed up with one method, you can add others:
Adding Password to Social Login Account ¶
If you signed up with Google or GitHub and want to add password login:
- Log in with your social account
- Navigate to account settings or profile
- Look for “Add Password” or “Link Password”
- Enter your desired password (optionally a username)
- Click “Save” or “Link”
Now you can log in with either Google or email/password.
Adding Social Login to Password Account ¶
If you signed up with email/password and want to add Google login:
- Log in with your password
- Navigate to account settings
- Look for “Link Google Account” or similar
- Click the link button
- Authorize the application in Google’s window
- You’ll be redirected back and the accounts are linked
Now you can log in with either method.
Viewing Linked Accounts ¶
In account settings, you can typically see which login methods are linked:
- Email/Password: Shows if you have a password set
- Google: Shows if Google is linked
- GitHub: Shows if GitHub is linked
Unlinking Accounts ¶
Some applications allow you to unlink login methods:
- Navigate to account settings
- Find the linked account section
- Click “Unlink” next to the method you want to remove
Note: You cannot unlink your last login method. At least one must remain.
Email Verification ¶
Some applications require email verification for security:
- After signing up, check your email inbox
- Open the verification email
- Click the verification link
- Your email is now verified
Verification links typically expire after 24 hours. If your link expires, request a new one from the application.
Password Requirements ¶
Passwords must meet these minimum requirements:
- At least 8 characters long
- No maximum length limit
Some applications may enforce stronger requirements such as:
- Uppercase and lowercase letters
- Numbers
- Special characters
The signup form will indicate specific requirements if they apply.
Forgot Password ¶
If you forget your password:
- Click “Forgot password?” on the login page
- Enter your email address
- Click “Send Reset Link”
- Check your email for the password reset link
- Click the link (valid for 1 hour)
- Enter your new password
- Click “Reset Password”
For security, you’ll always see a success message even if the email address isn’t registered in the system.
Changing Your Password ¶
If you’re logged in and want to change your password:
- Navigate to account settings
- Look for “Change Password” or similar option
- Enter your current password
- Enter your new password
- Confirm your new password
- Click “Update Password”
Note: The exact steps depend on how the application implements its settings interface.
Account Security ¶
Best Practices ¶
- Use a strong, unique password: Don’t reuse passwords across sites
- Enable email verification: If offered, verify your email for account recovery
- Remember where you signed up: Note whether you used password or social login
- Review account activity: Check for suspicious login attempts if the application provides this feature
- Sign out on shared devices: Always sign out when using public computers
Password Managers ¶
Password managers are recommended for creating and storing strong passwords. They integrate seamlessly with OneAuth-enabled applications.
Social Login Security ¶
When using social login:
- You’re trusting the social provider (Google, GitHub, etc.) for authentication
- Revoke application access in your social provider’s settings if you no longer use an application
- Your email address from the social provider is used as your identity
Privacy ¶
Information Collected ¶
Applications using OneAuth typically store:
- Your email address or phone number
- Your username
- Hashed password (if using password authentication) - bcrypt one-way hash that cannot be reversed
- Profile information from social providers (if using social login)
Information Not Collected ¶
OneAuth does not:
- Store passwords in plain text
- Share your credentials between applications
- Track your activity across different applications
Each application using OneAuth maintains its own user database.
Common Issues ¶
“Invalid credentials” error ¶
- Verify you’re entering the correct email and password
- Check if caps lock is on
- Ensure you’re using the correct authentication method (password vs. social login)
- Try resetting your password if needed
Email verification link not working ¶
- Check if the link has expired (usually 24 hours)
- Ensure you clicked the complete link (some email clients break long URLs)
- Request a new verification link from the application
Not receiving emails ¶
- Check your spam/junk folder
- Verify you entered the correct email address
- Wait a few minutes, as email delivery can be delayed
- Contact the application’s support if emails continue not to arrive
Can’t remember which sign-in method was used ¶
- Try password login first
- If that fails, try social login options
- Use the “Forgot password” feature to confirm if a password account exists
Account lockout ¶
Applications may lock your account after too many failed login attempts (typically 5). If this happens:
- Wait for the lockout period to expire (typically 15 minutes)
- Use the “Forgot password” feature to reset and regain access
- Contact application support if you believe your account was compromised
You may also see “Too many requests” if you’re attempting logins too rapidly. Wait a minute and try again.
Multiple Accounts ¶
OneAuth links authentication methods by email address:
- Same email, different methods = Same account: Signing up with password and later using Google with the same email accesses one account
- Different emails = Different accounts: Using different email addresses creates separate accounts, even with the same provider
Session Management ¶
Session Duration ¶
Applications control how long you stay signed in. Common approaches:
- Active sessions expire after inactivity (15-30 minutes typical)
- Sessions persist until you sign out
- “Remember me” option for extended sessions
Signing Out ¶
Always sign out when finished, especially on shared devices:
- Look for “Sign Out” or “Log Out” button
- Click it to end your session
- You’ll be redirected to the login page
Multiple Devices ¶
You can be signed in on multiple devices simultaneously. Signing out on one device doesn’t affect other sessions unless the application implements global logout.
Developer Support ¶
If you experience issues with OneAuth in an application:
- Check the application’s support documentation
- Contact the application’s support team
- Report bugs to the application developers
OneAuth is a library integrated by application developers. For issues with specific applications, contact those applications directly.
Technical Users ¶
API Access ¶
Applications using OneAuth may provide API access for programmatic use. This includes:
API Login
curl -X POST https://app.example.com/api/login \
-H "Content-Type: application/json" \
-d '{"grant_type":"password","username":"your@email.com","password":"yourpassword"}'
This returns an access token and refresh token for subsequent API calls.
Using Access Tokens
curl https://app.example.com/api/resource \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Access tokens expire quickly (typically 15 minutes). Use the refresh token to get a new access token.
Refreshing Tokens
curl -X POST https://app.example.com/api/login \
-d '{"grant_type":"refresh_token","refresh_token":"YOUR_REFRESH_TOKEN"}'
API Keys
For long-lived access (CI/CD, scripts, automation), create an API key:
- Log in to the application
- Navigate to API settings or developer settings
- Create a new API key with appropriate scopes
- Store the key securely - it’s only shown once
Use API keys like access tokens:
curl https://app.example.com/api/resource \
-H "Authorization: Bearer oa_YOUR_API_KEY"
Scopes
API tokens have scopes that limit what they can access:
read- Read datawrite- Modify dataprofile- Access profile information
When creating API keys, request only the scopes you need.
Federated Access
Some applications use OneAuth in a federated model where you authenticate with one service (your “host”) and the token grants access to another (e.g., a relay server). In this case:
- You log in to your host application normally
- The host mints a short-lived token scoped for the relay
- Your client uses this token to connect to the relay
- If the token expires, your client reconnects automatically with a fresh token from the host
Use the CLI ¶
The oneauth binary covers token acquisition, introspection, dynamic client registration, and JWKS inspection without writing any Go. Install once:
go install github.com/panyam/oneauth/cmd/oneauth@latest
Three output formats are available via --format:
json(default) — RFC 6749 §5.1 shape; pipe tojq.bash—export OAUTH_…=lines suitable foreval/source.access-token-only— the bare token; suitable forAuthorization: Bearer $(oneauth token cc … --format access-token-only).
Sourceable example:
# Acquire a token and load it into the calling shell.
eval "$(oneauth token client-credentials https://auth.example.com \
--client-id my-app --client-secret-stdin --format bash <<<"$CLIENT_SECRET")"
# Now $OAUTH_ACCESS_TOKEN is set; use it directly.
curl -H "Authorization: Bearer $OAUTH_ACCESS_TOKEN" https://api.example.com/me
Subcommand cheat sheet:
| Command | What it does |
|---|---|
oneauth token browser <issuer> |
Authorization code + PKCE for desktop / CLI clients (RFC 8252). |
oneauth token client-credentials <issuer> |
Machine-to-machine grant (RFC 6749 §4.4); aliased as cc. |
oneauth token password <issuer> |
Username/password grant (RFC 6749 §4.3); deprecated for new use. |
oneauth token refresh <issuer> |
Exchange a refresh token for a fresh access token (RFC 6749 §6). |
oneauth token device <issuer> |
Device authorization grant (RFC 8628). For headless devices and CLI tools — prints a code, polls until the user approves on a separate device. --open launches a browser; --qr renders an ASCII QR code. |
oneauth introspect <issuer> |
Check whether a token is active (RFC 7662). --format active returns just true/false for shell predicates. |
oneauth dcr register | get | put | delete <issuer> |
Dynamic Client Registration + management (RFC 7591 / 7592). |
oneauth jwks <issuer> |
Fetch + pretty-print the AS’s JSON Web Key Set (RFC 7517). --kid / --sig-only filters. |
oneauth <subcommand> --help enumerates every flag for each command.
Browser Requirements ¶
OneAuth works with modern browsers that support:
- JavaScript enabled
- Cookies enabled
- HTTPS connections
- Form submissions
For optimal security, keep your browser updated to the latest version.