Skip to content

OAUTH QUICK START

GitHub Actions edited this page Feb 17, 2026 · 3 revisions

OAuth Quick Start Guide

Get OAuth authentication working in 5 minutes.

1. Install OAuth Handlers

nself oauth install

2. Enable Providers

nself oauth enable --providers google,github

3. Get OAuth Credentials

Google

  1. Go to Google Cloud Console
  2. Create project → APIs & Services → Credentials
  3. Create OAuth client ID (Web application)
  4. Add redirect URI: http://localhost:3100/oauth/google/callback
  5. Copy Client ID and Client Secret

GitHub

  1. Go to GitHub Settings
  2. OAuth Apps → New OAuth App
  3. Callback URL: http://localhost:3100/oauth/github/callback
  4. Copy Client ID and Client Secret

4. Configure Credentials

nself oauth config google \
  --client-id=YOUR_CLIENT_ID \
  --client-secret=YOUR_CLIENT_SECRET

nself oauth config github \
  --client-id=YOUR_CLIENT_ID \
  --client-secret=YOUR_CLIENT_SECRET

5. Build and Start

nself build
nself start

6. Test

Visit: http://localhost:3100/oauth/google

You should be redirected to Google login, then back to your frontend with a JWT token.

7. Integrate with Frontend

// Login button
<button onClick={() => {
  window.location.href = 'http://localhost:3100/oauth/google';
}}>
  Sign in with Google
</button>

// Handle callback
useEffect(() => {
  const token = new URLSearchParams(window.location.search).get('token');
  if (token) {
    localStorage.setItem('authToken', token);
    window.location.href = '/dashboard';
  }
}, []);

Done!

Your OAuth authentication is now working.

Next Steps

Troubleshooting

"Provider not enabled"

nself oauth enable --providers google

"Missing credentials"

nself oauth config google --client-id=xxx --client-secret=xxx

"Service not running"

nself start
docker logs oauth-handlers

Check status

nself oauth status
nself oauth test google

Need help? See OAuth Setup Guide for detailed instructions.

Home


Getting Started


Commands


Features


Configuration


Plugins (87 + 10 monitoring)

Free (25)
Pro (62)
Planned (26)
  • plugin-audit
  • plugin-blog
  • plugin-checkout
  • plugin-commerce
  • plugin-drm
  • plugin-export
  • plugin-flow
  • plugin-import
  • plugin-ldap
  • plugin-mailgun
  • plugin-media
  • plugin-oauth-providers
  • plugin-pages
  • plugin-postmark
  • plugin-rate-limit
  • plugin-reports
  • plugin-saml
  • plugin-scheduler
  • plugin-sendgrid
  • plugin-sso
  • plugin-subscription
  • plugin-thumb
  • plugin-transcoder
  • plugin-twilio
  • plugin-waf
  • plugin-watermark

Guides


Architecture


Reference


Licensing


Security


Brand


Operations


Contributing


Admin


Changelog


All commands (52)

Clone this wiki locally