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 – no signup required!