Auth API
Auth API
Section titled “Auth API”Endpoints for authentication and user management.
Base URL
Section titled “Base URL”https://api.os.eura.dev/api/v1/authGitHub OAuth
Section titled “GitHub OAuth”Initiate the GitHub OAuth flow to authenticate users.
GET /auth/githubQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
redirect_uri |
string | No | Custom redirect URI (defaults to callback) |
Request Example
Section titled “Request Example”// Redirect user to GitHubwindow.location.href = 'https://api.os.eura.dev/api/v1/auth/github';Get Current User
Section titled “Get Current User”Get information about the currently authenticated user.
GET /auth/meAuthentication
Section titled “Authentication”Required: Session cookie
Response
Section titled “Response”{ "id": "usr_abc123", "username": "your-username", "githubId": "1234567"}Logout
Section titled “Logout”Clear the current session.
POST /auth/logoutAuthentication
Section titled “Authentication”Required: Session cookie (to clear)
Response
Section titled “Response”{ "message": "Logged out successfully"}