0Pricing
OAuth2 & OpenID Connect Deep Dive · Урок

Единый вход в приложения

Узнайте, как OAuth2 и OpenID Connect обеспечивают единый вход, позволяя пользователям пройти аутентификацию один раз и беспрепятственно получать доступ к нескольким приложениям.

«Единый вход в приложения» — бесплатный урок OAuth2 & OpenID Connect Deep Dive на CoddyKit. Это урок 4 из 4. Ты можешь прочитать весь урок бесплатно ниже — а потом практиковать его прямо в браузере с встроенным редактором кода и ИИ-репетитором 24/7. Это часть пути обучения OAuth2 & OpenID Connect Deep Dive, и твой прогресс синхронизируется между веб-версией и приложением CoddyKit. Курс OAuth2 & OpenID Connect Deep Dive содержит 4 уроков всего.

Части этого урока еще не переведены и отображаются на английском.

What Is SSO?

Single Sign-On lets a user authenticate once with a central identity provider and then access many applications without logging in again. OpenID Connect is the modern foundation for web and mobile SSO.

The Central Session

The magic lives at the OpenID Provider (OP). When the user logs in, the OP establishes its own session (often a cookie). Each app relies on that central session rather than maintaining its own credentials.

First App Login

App A redirects the user to the OP's /authorize endpoint. The user enters credentials, the OP sets its session cookie, and returns an authorization code to App A, which exchanges it for tokens.

Second App: Silent Login

Later the user opens App B, which also redirects to /authorize. Because the OP session cookie already exists, the OP recognizes the user and returns a code without prompting for credentials again. That is the SSO experience.

prompt=none

To check silently whether a session exists, apps can use prompt=none. The OP either returns a code immediately or an error like login_required if no session is present.

GET /authorize?response_type=code
  &client_id=appB&scope=openid
  &redirect_uri=https://b.example.com/cb
  &prompt=none

Forcing Re-authentication

Conversely, sensitive operations can require a fresh login with prompt=login or a max_age constraint, overriding the SSO session for that request.

Identity Provider Federation

The OP itself may federate to upstream providers (corporate IdP, Google, social logins). To the apps it still looks like one OP, but the OP brokers authentication to the chosen source. This centralizes policy and simplifies clients.

Single Logout

SSO needs Single Logout too: when the user signs out of one app, related sessions should end. OIDC offers front-channel and back-channel logout to notify participating apps and clear the central session.

Session Token Lifetimes

Balance convenience and security: short access tokens with refresh tokens for ongoing access, and an OP session lifetime that matches your risk tolerance. Long SSO sessions are convenient but widen the impact of a compromised device.

Native and Mobile SSO

On mobile, SSO uses the system browser (ASWebAuthenticationSession / Custom Tabs) so the OP cookie is shared across apps. Embedded WebViews break SSO and are discouraged for security and usability reasons.

Benefits and Risks

SSO improves UX, centralizes MFA and auditing, and reduces password fatigue. The trade-off: the OP becomes a high-value target, so it must be hardened, monitored, and protected with strong authentication.

Quick Check

Test your SSO understanding.

Recap

Single Sign-On centralizes authentication at the OpenID Provider.

  • The OP session lets subsequent apps log in silently.
  • prompt=none checks for a session; prompt=login/max_age force re-auth.
  • Single Logout coordinates ending sessions across apps.
  • Use the system browser, not embedded WebViews, for mobile SSO.

Часто задаваемые вопросы

Урок «Единый вход в приложения» бесплатный?

Да — полный текст урока «Единый вход в приложения» бесплатно доступен здесь в веб-версии. Чтобы практиковать его интерактивно (встроенный редактор кода и ИИ-репетитор 24/7) и разблокировать остальной курс OAuth2 & OpenID Connect Deep Dive, подпишись на CoddyKit PRO. Курс OAuth2 & OpenID Connect Deep Dive содержит 4 уроков всего.

Чему я научусь в уроке «Единый вход в приложения»?

Узнайте, как OAuth2 и OpenID Connect обеспечивают единый вход, позволяя пользователям пройти аутентификацию один раз и беспрепятственно получать доступ к нескольким приложениям. Ты практикуешь OAuth2 & OpenID Connect Deep Dive с помощью реального кода, который запускаешь прямо в браузере, и ИИ-репетитор 24/7 отвечает на твои вопросы во время урока.

Нужен ли мне опыт, чтобы начать OAuth2 & OpenID Connect Deep Dive?

Предыдущий опыт не требуется. OAuth2 & OpenID Connect Deep Dive на CoddyKit структурирован для всех уровней — от новичков до продвинутых, поэтому ты можешь начать отсюда или с самого начала и учиться в своем темпе. Это урок 4 из 4.

Сколько времени занимает урок «Единый вход в приложения»?

Большинство уроков CoddyKit занимают около 5–10 минут. Каждый из них компактный и интерактивный, поэтому ты постоянно делаешь прогресс и продолжаешь с того же места в веб-версии и приложении.

Можно ли писать и запускать код в этом уроке OAuth2 & OpenID Connect Deep Dive?

Да. Каждый урок OAuth2 & OpenID Connect Deep Dive включает встроенный редактор кода, поэтому ты пишешь и запускаешь реальный код прямо в браузере и получаешь моментальную обратную связь от AI — локальная установка не требуется.

Все уроки этого курса

  1. Интеграция с поставщиками идентификации
  2. Безопасность микросервисов и API-шлюзов
  3. Многофакторная аутентификация (MFA)
  4. Единый вход в приложения
← Назад к OAuth2 & OpenID Connect Deep Dive