- Added a new AGENTS.md file to document the project structure and conventions. - Updated .gitignore to include node_modules and refined cursor rules. - Introduced new backend and frontend components for improved map interactions, including context menus and controls. - Enhanced API composables for better admin and authentication functionalities. - Refactored existing components for cleaner code and improved user experience. - Updated README.md to clarify production asset serving and user setup instructions.
16 lines
396 B
TypeScript
16 lines
396 B
TypeScript
import type { MeResponse } from '~/types/api'
|
|
|
|
/** Auth composable: login, logout, me, OAuth, setup. Uses useMapApi internally. */
|
|
export function useAuth() {
|
|
const api = useMapApi()
|
|
|
|
return {
|
|
login: api.login,
|
|
logout: api.logout,
|
|
me: api.me,
|
|
oauthLoginUrl: api.oauthLoginUrl,
|
|
oauthProviders: api.oauthProviders,
|
|
setupRequired: api.setupRequired,
|
|
}
|
|
}
|