Single Sign-On tra le applicazioni
Impari come OAuth2 e OpenID Connect abilitino il Single Sign-On, consentendo agli utenti di autenticarsi una volta e accedere senza interruzioni a più applicazioni.
Single Sign-On tra le applicazioni è una lezione OAuth2 & OpenID Connect Deep Dive gratuita su CoddyKit. Questa è la lezione 4 di 4. Puoi leggere la lezione completa qui gratuitamente — poi esercitati direttamente nel browser con un editor di codice integrato e un tutor IA disponibile 24/7. Fa parte del percorso di apprendimento OAuth2 & OpenID Connect Deep Dive, e i tuoi progressi si sincronizzano tra il web e l'app CoddyKit. Il corso OAuth2 & OpenID Connect Deep Dive include 4 lezioni in totale.
Parti di questa lezione non sono ancora state tradotte e vengono mostrate in inglese.
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=noneForcing 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=nonechecks for a session;prompt=login/max_ageforce re-auth.- Single Logout coordinates ending sessions across apps.
- Use the system browser, not embedded WebViews, for mobile SSO.
Domande Frequenti
La lezione «Single Sign-On tra le applicazioni» è gratuita?
Sì — il testo completo di «Single Sign-On tra le applicazioni» è gratuito qui sul web. Per esercitarvi in modo interattivo (un editor di codice integrato e un tutor IA 24/7) e sbloccare il resto del corso OAuth2 & OpenID Connect Deep Dive, passa a CoddyKit PRO. Il corso OAuth2 & OpenID Connect Deep Dive include 4 lezioni in totale.
Cosa imparerò in «Single Sign-On tra le applicazioni»?
Impari come OAuth2 e OpenID Connect abilitino il Single Sign-On, consentendo agli utenti di autenticarsi una volta e accedere senza interruzioni a più applicazioni. Eserciti OAuth2 & OpenID Connect Deep Dive con codice pratico che esegui direttamente nel browser, e un tutor IA 24/7 risponde alle tue domande mentre lavori sulla lezione.
Ho bisogno di esperienza per iniziare OAuth2 & OpenID Connect Deep Dive?
Non è richiesta alcuna esperienza precedente. OAuth2 & OpenID Connect Deep Dive su CoddyKit è strutturato per principianti e studenti avanzati, quindi puoi iniziare da qui o dall'inizio e procedere al tuo ritmo. Questa è la lezione 4 di 4.
Quanto tempo richiede la lezione «Single Sign-On tra le applicazioni»?
La maggior parte delle lezioni CoddyKit richiede circa 5–10 minuti. Ogni lezione è breve e interattiva, quindi fai progressi costanti e riprendi esattamente da dove hai lasciato su web e app.
Posso scrivere ed eseguire codice in questa lezione OAuth2 & OpenID Connect Deep Dive?
Sì. Ogni lezione OAuth2 & OpenID Connect Deep Dive include un editor di codice integrato, quindi scrivi ed esegui codice reale direttamente nel tuo browser e ricevi feedback istantaneo dall'IA — nessuna configurazione locale necessaria.
Tutte le lezioni di questo corso
- Integrazione con gli Identity Provider
- Sicurezza dei microservizi e degli API Gateway
- Autenticazione multifattore (MFA)
- Single Sign-On tra le applicazioni