Replies: 2 comments
-
|
Hi, |
Beta Was this translation helpful? Give feedback.
-
|
This is more of enhancement and its more of changing the behaviour and design for silent authentication. The core of this issue is to whether attemptSilentLogin() should check the existing cookie. Moving this discussion to gather broader feedback before defining the implementation path. This is about behaviour and design silent login and checks, it would be helpful to hear broader feedback and use cases. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Checklist
Describe the problem you'd like to have solved
Current behavior:
attemptSilentLogin()middleware will attempt aprompt=nonelogin for the first visit, and then set an "attempted" cookie (skipSilentLogin) to prevent an infinite loop.This is done without any attempt to check the presence of an "is authenticated" flag/hint cookie—which is present on the origin, if the app shares an origin with the IdP (e.g. a custom domain set on an Auth0 tenant).
Describe the ideal solution
In the SPA library
auth0-spa-js, thecheckSession()function contains a feature where the XHR silent login,getTokenSilentlyis only attempted in the presence of an "isAuthenticated" cookie,isAuthenticatedCookieName.If an application is on the same origin domain (e.g.
app.example.comandauth.example.com), then the "is authenticated" flag cookie should also be available toexpress-openid-connect, allowing an application to only performprompt=nonelogins when there is a high degree of confidence that there is a global session.Please consider adding this as a feature (default behavior or configurable) to this library's
attemptSilentLogin()middleware. This helps defer unnecessary logins, and keep usage of Auth0 Authentication API quotas to a minimum for high traffic sites, while still providing a seamless-SSO experience for users with "hinted" global sessions.Alternatives and current workarounds
Instead of using the attemptSilentLogin() middleware, a custom middleware can be built which checks for the flag cookie and manually calls:
Additional context
#630 refers to taking into account the global Auth0 session, but the main use case seems to be synchronizing a global logout, not making
attemptSilentLogin()smarter to defer quota-consuming auth checks.Beta Was this translation helpful? Give feedback.
All reactions