peppa/openspec/changes/archive/2026-11-15-pep-90-google-login/proposal.md
Асель 3159e888d2 PEP-90: sign in and register with Google (OAuth code + PKCE), link with eGov in Settings
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 12:40:26 +05:00

15 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# PEP-90: Вход и регистрация через Google-почту
## Зачем
Сейчас в Пеппу входят только через eGov QR (PEP-71). Нужен и обычный вход «через Google»: не у всех под рукой eGov Mobile.
## Что меняется
- На странице входа рядом с eGov — кнопка «Войти через Google» (OAuth 2.0 authorization code + PKCE).
- Первый вход создаёт учётку как у eGov: без Gitea и пароля, логин из адреса почты; следующий находит её по Google-аккаунту (`sub`).
- В «Настройках» можно привязать Google к учётке eGov, а eGov — к учётке Google (оба способа ведут в одну учётку).
- Отключённый пользователь войти не может; state/code одноразовые и привязаны к браузеру.
- Мок Google OAuth (`mock-google`) для тестов и работы до выдачи OAuth-клиента.
## Нужно от PM
OAuth-клиент в Google Cloud (Web application): redirect URI `https://peppa.telecom.quest/auth/google/callback`, `GOOGLE_CLIENT_ID` / `GOOGLE_CLIENT_SECRET` в `.env`. Без них кнопки Google нет.