-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
A secure API route that allows a logged-in user to fetch their profile information, including:
- Basic user details:
nameandemail - Local Mind API key (used in our system)
- The AI model selected by the user
- The AI model provider (e.g., OpenAI, Anthropic)
- If the selected model is paid, return the user's API key for that model
Security Requirements
Never expose plain-text API keys in network requests or server logs.
- API keys must be stored encrypted at rest (e.g., using AES-256).
- The server should only return encrypted API keys.
- Client is responsible for decrypting the keys securely.
- Ensure authenticated access — only the logged-in user can fetch their own profile data.
- No logging or exposure of sensitive keys on the server.
📍 Endpoint
GET /api/v1/user/profile
📤 Response Example
{
"success": true,
"message": "User profile fetched successfully",
"data": {
"name": "Jane Doe",
"email": "jane@example.com",
"localMindApiKey": "abc123-local-key",
"aiModel": {
"provider": "OpenAI",
"model": "gpt-4",
"isPaid": true,
"apiKey": "sk-user-api-key"
}
}
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers