{% extends "base.html" %} {% block title %}{{ action }} OAuth Client - Mock API Admin{% endblock %} {% block content %}

{{ action }} OAuth Client

Configure an OAuth 2.0 client registration.

{% if error %} {% endif %}
{% if client and client.id %} {% endif %}
{{ errors.client_name if errors and errors.client_name else 'Client name is required.' }}
Human-readable name for this client.
{{ errors.redirect_uris if errors and errors.redirect_uris else 'Enter one or more redirect URIs separated by commas.' }}
Comma-separated list of allowed redirect URIs (must be http:// or https://). Example: https://myapp.com/callback, https://localhost:3000/callback.
{{ errors.grant_types if errors and errors.grant_types else 'Enter allowed grant types separated by commas.' }}
Comma-separated list of OAuth 2.0 grant types. Allowed values: authorization_code, client_credentials, password, refresh_token.
{{ errors.scopes if errors and errors.scopes else 'Enter allowed scopes separated by commas.' }}
Comma-separated list of OAuth scopes that this client can request. Example: read,write,admin.
Inactive clients cannot authenticate or obtain tokens.
Cancel
Help
Client Credentials

Client ID and secret will be generated automatically upon creation. The secret will be shown only once – store it securely.

Redirect URIs

Must be absolute URIs with scheme http:// or https://. The redirect URI used in authorization requests must match exactly.

Grant Types
  • authorization_code: For web server applications.
  • client_credentials: For machine‑to‑machine authentication.
  • password: For trusted first‑party clients (discouraged).
  • refresh_token: Allows obtaining new access tokens.
Security

Client secrets are hashed using bcrypt before storage. Never expose secrets in logs or client‑side code.

{% endblock %} {% block extra_scripts %} {% endblock %}