Spaces:
network01
/
Runtime error

akhaliq HF Staff commited on
Commit
c6abd4e
·
1 Parent(s): f4952e1

Implement server-side OAuth for Docker Space

Browse files

- Add OAuth endpoints to FastAPI backend (/api/auth/login, /api/auth/callback, /api/auth/session)
- Replace client-side OAuth with server-side flow using OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET
- Handle HuggingFace OAuth callback and token exchange
- Create session management for authenticated users
- Update frontend to use backend OAuth endpoints instead of @huggingface/hub
- Remove @huggingface/hub dependency (not needed for Docker Spaces)
- Fix 'Failed to start login process' error by implementing proper Docker Space OAuth

3 files changed +170 -21
Files changed (3)
backend_api.py+119-2
frontend/package.json-1
frontend/src/lib/auth.ts+51-18