Oauth 2.0 Mock Server

Simulate OAuth 2.0 Flows with Zero Hassle

The OAuth 2.0 Mock Server is a developer-friendly tool that mimics real-world OAuth 2.0 providers like Google, GitHub, and others. Perfect for local development, testing, and CI pipelines, it provides fully configurable endpoints for authorize, token, and userinfo flows. No setup required from Google or GitHub.

Oauth 2.0 Mock Server is your solution to frontend-first development! No backend delays – focus on rapid prototyping. Perfect for demos, teaching, interviews. Always online, always available. Empower your creativity today!

Use cases:

1. Test Oauth 2.0 login flows with minimal setup. 2. Automate authentication testing in CI/CD pipelines. 3. Build apps faster with a drop-in Oauth 2.0 mock that behaves like a real provider.

Oauth 2.0 Mock Server server is up and running!

Access these mock data endpoints by using the base URL below in your requests.

https://oauth-mock.mock.beeceptor.com



Request Headers:
N/A
N/A
Response Headers:
{
  "Content-Type": "text/html"
}
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>Oauth2 Login</title>
  <style>
    body {
      font-family: sans-serif;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }
    .login-box {
      background: white;
      padding: 2rem 2.5rem;
      border: 1px solid black;
      width: 100%;
      max-width: 400px;
      text-align: center;
    }
    .form-box {
      display: flex;
      flex-direction: column;
      gap: 1em;
    }
    input[type="email"], input[type="password"], input[type="submit"] {
      font-size: 1rem;
      border: 1px solid black;
      padding: 10px 5px;
    }
    input[type="submit"] {
      background-color: #2ea44f;
      color: white;
      border: none;
      font-size: 1.1rem;
      border-radius: 4px;
      cursor: pointer;
    }
    input[type="submit"]:hover {
      background-color: #218838;
    }
    label {
      font-weight: bold;
      text-align: left;
      display: block;
    }
  </style>
</head>
<body>
  <div class="login-box">
    <h2>Sign in (Powered by Beeceptor)</h2>
    <form method="POST" action="/login" class="form-box">
      <input type="hidden" name="nonce" value="{{queryParam "nonce"}}"/>
      <input type="hidden" name="state" value="{{queryParam "state"}}"/>
      <input type="hidden" name="redirect_uri" value="{{queryParam "redirect_uri"}}"/>
      <input type="hidden" name="client_id" value="{{queryParam "client_id"}}"/>

      <label for="email">Email</label>
      <input type="email" name="email" placeholder="your-email@example.com" required />

      <label for="password">Password</label>
      <input type="password" name="password" required />

      <input type="submit" value="Login" />
    </form>
  </div>
</body>
</html>
Request Headers:
N/A
N/A
Response Headers:
{
  "Content-Type": "application/json"
}
{
  "id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiJnb29nbGUtaWQtMTIzIiwic3ViIjoiMTEwMjQ4NDk1OTIxMjM4OTg2NDIwIiwibmFtZSI6IkJlZSBDZXB0b3IiLCJlbWFpbCI6Im9hdXRoLXNhbXBsZS1nb29nbGVAYmVlY2VwdG9yLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJwaWN0dXJlIjoiaHR0cHM6Ly9jZG4uYmVlY2VwdG9yLmNvbS9hc3NldHMvaW1hZ2VzL2xvZ28tYmVlY2VwdG9yLnBuZyIsImF1ZCI6Imdvb2dsZS1pZC0xMjMiLCJpYXQiOjE2ODAwMDAwMDAsImV4cCI6NjQwNzM0MTMzNjYsInJhdCI6MX0.dummysignature",
  "access_token": "{{faker 'internet.jwt'}}",
  "token_type": "Bearer",
  "scope": "read write",
  "issued_at": "{{now 'utc'}}"
}
Request Headers:
N/A
N/A
Response Headers:
{
  "Content-Type": "application/json"
}
{
  "access_token": "{{faker 'internet.jwt'}}",
  "token_type": "Bearer",
  "scope": "read write",
  "issued_at": "{{now 'utc'}}"
}
Request Headers:
N/A
N/A
Response Headers:
{
  "Content-Type": "text/html"
}
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>Redirecting...</title>
</head>
<body>
  <p>Redirecting, please wait...</p>
  <script>
    const redirectUri = "{{body "redirect_uri"}}";
    const state = "{{body "state"}}";
    const redirectUrl = `${redirectUri}?code=mock-code-123&state=${state}`;
    window.location.href = redirectUrl;
  </script>
</body>
</html>
Request Headers:
N/A
N/A
Response Headers:
{
  "Content-Type": "application/json"
}
{
  "login": "bee-user",
  "id": 459,
  "node_id": "MDQ6VXNlcjE=",
  "avatar_url": "https://cdn.beeceptor.com/assets/images/logo-beeceptor.png",
  "gravatar_id": "",
  "url": "https://oauth-mock.mock.beeceptor.com/userinfo",
  "html_url": "https://github.com/octocat",
  "followers_url": "https://api.github.com/users/octocat/followers",
  "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  "organizations_url": "https://api.github.com/users/octocat/orgs",
  "repos_url": "https://api.github.com/users/octocat/repos",
  "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  "received_events_url": "https://api.github.com/users/octocat/received_events",
  "type": "User",
  "site_admin": false,
  "name": "Bee User",
  "company": "Beeceptor",
  "blog": "https://github.com/blog",
  "location": "India",
  "email": "oauth-sample-github@beeceptor.com",
  "hireable": false,
  "bio": "There once was...",
  "twitter_username": "beeceptor",
  "public_repos": 2,
  "public_gists": 1,
  "followers": 20,
  "following": 0,
  "created_at": "2008-01-14T04:33:35Z",
  "updated_at": "2008-01-14T04:33:35Z",
  "private_gists": 81,
  "total_private_repos": 100,
  "owned_private_repos": 100,
  "disk_usage": 10000,
  "collaborators": 8,
  "two_factor_authentication": true,
  "plan": {
    "name": "Medium",
    "space": 400,
    "private_repos": 20,
    "collaborators": 0
  }
}
Request Headers:
N/A
N/A
Response Headers:
{
  "Content-Type": "application/json"
}
{
 "sub": "110248495921238986420",
 "name": "Bee User",
 "given_name": "Bee",
 "family_name": "Ceptor",
 "picture": "https://cdn.beeceptor.com/assets/images/logo-beeceptor.png",
 "email": "oauth-sample-google@beeceptor.com",
 "email_verified": true,
 "locale": "en",
 "hd": "beeceptor.com"
}
Service Homepage: oauth.net/2/
API documentation: oauth.net/2/
oauth 2.0 mock serveroauth 2.0oauth 2.0 playground