Skip to content

Feature/connect-and-disconnect-oauth-provider#79

Open
AlexandrNel wants to merge 6 commits into
devfrom
feature/connect-oauth
Open

Feature/connect-and-disconnect-oauth-provider#79
AlexandrNel wants to merge 6 commits into
devfrom
feature/connect-oauth

Conversation

@AlexandrNel

Copy link
Copy Markdown
Collaborator

Что сделано

  • OAuth: привязка/отвязка провайдеров — на странице профиля добавлен раздел "Связанные аккаунты" с возможностью подключить/отключить OAuth-провайдера (Яндекс, ВК, GitHub). При подключении выполняется редирект на провайдера, при отключении — мутация без редиректа + инвалидация кэша.
  • ProfilePage — новая страница-обработчик для OAuth-редиректа обратно в профиль (показывает toast об успехе/ошибке).
  • QueryParamsHandler — универсальный клиентский компонент для показа toast-уведомлений из query-параметров (success, message), переиспользуется на страницах.
  • Рефакторинг: добавлены authKeys для query key factory; исправлена опечатка connecteOAuthProvder → connectOAuthProvder; удалён дублирующийся AuthRedirectHandler из signin; в OAuthPage добавлена передача success/message через URL при редиректе.

Проверка

  • Зайти на /profile, проверить отображение секции "Связанные аккаунты"
  • Нажать "Привязать Яndex" – должен выполниться редирект на OAuth провайдера
  • После подтверждения – редирект обратно в профиль с toast-уведомлением
  • Нажать "Отвязать" – провайдер должен отвязаться без редиректа, появиться toast

@AlexandrNel AlexandrNel requested a review from soorq June 12, 2026 23:18
@AlexandrNel AlexandrNel requested a review from kapitulin24 as a code owner June 12, 2026 23:18
@github-actions github-actions Bot added ui-kit Shared UI components, styles and storybook core-logic Global providers, api instances and core shared libs features User scenarios and sliced features domain Business entities and models views Pages, widgets and layouts config labels Jun 12, 2026
@@ -0,0 +1,32 @@
'use client';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Как-то странно, что ты его глобально вынес, думаю лучше на уровне авторизации посадить это

<SidebarMenu>
<Projects />
</SidebarMenu>
<Link href={`http://localhost:3001/oauth?success=true&message=Вход+успешен`}>тест</Link>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

удали

… to SVG format, and move them to `public` folder, remove unnecessary props in `OAuthButton`.
@AlexandrNel AlexandrNel force-pushed the feature/connect-oauth branch from 0761ed1 to 115c8c5 Compare June 13, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config core-logic Global providers, api instances and core shared libs domain Business entities and models features User scenarios and sliced features ui-kit Shared UI components, styles and storybook views Pages, widgets and layouts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants