Back to All APIs

Auth API

Login, logout, refresh tokens, and user registration

Endpoints

Authentication Patterns

🔑 JWT Tokens

JSON Web Tokens for stateless authentication

🍪 Session Cookies

HTTP-only cookies for secure session management

🔄 Refresh Tokens

Long-lived tokens to obtain new access tokens

🛡️ OAuth 2.0

Third-party authentication with Google, GitHub, etc.

Common Use Cases

Login Forms

User authentication with email/password

Registration

New user signup with validation

Protected Routes

Restrict access to authenticated users

Token Expiry

Handle token refresh and expiration

Try it with MockAPI Dog

Create a mock Auth API endpoint in seconds

Create Auth Endpoint →