Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 ASWebAuthenticationSession 时如何清除 cookie,场景就像,不同的用户可以使用相同的设备登录。如果用户已经在完成 SSO 的情况下使用它,则应用不会为新用户坚持 SSO。
所以需要清除cookies。
提前致谢。
在调用 session 之前,session.start()您需要设置一个特定属性: session.prefersEphemeralWebBrowserSession = true.
session.start()
session.prefersEphemeralWebBrowserSession = true
它将开始清除会话并且不会设置新的 cookie。