授权服务器上的会话起什么作用?

What role does session on the Authorization server play?

我正在阅读这篇文章中的会话 https://auth0.com/docs/users/sessions

它说当用户登录时,会创建两种类型的会话

Two sessions are created:

The local session (storezero.io): Allows the application to know if a user is authenticated.

The session on the Authorization Server (storezero.auth0.com): Allows the Authorization Server to know if a user is authenticated and optionally, tracks other information. For example, the Authorization Server can track whether a user has authenticated using MFA. If so, the next time the user arrives at the Authorization Server, they won't need to see a login page or be prompted to use MFA again.

它说 "the next time the user arrives at the Authorization Server, they won't need to see a login page or be prompted to use MFA again."

这句话到底是什么意思?为什么他们看不到登录页面?

会话在授权服务器上的作用是什么?为什么在授权服务器中存储会话很重要?如果我们使用 JWT 令牌进行身份验证,我认为在服务器上存储会话没有任何用处。 (因为JWT token可以被资源服务器验证,不需要和授权服务器通信)

例如,当您在 gmail.com 上登录时,您将被重定向到 https://accounts.google.com/ 并在那里进行身份验证。您还将获得 accounts.google.com 的会话 cookie。然后您将被重定向回 gmail.com。太棒了!

当你下次想去 https://calendar.google.com/ 时,你将被重定向到 accounts.google.com 进行身份验证,但由于你已经在那里登录(使用会话 cookie),那么你将也会自动登录 calendar.google.com。

因此,通过与您的身份提供者进行会话,您可以获得跨多个服务的单点登录 (SSO) 体验。 (假设所需的范围不变)。