【发布时间】:2018-11-07 23:52:16
【问题描述】:
我使用 SFAuthenticationSession 通过 SSO 登录到 login.microsoftonline.com。它工作得很好,但是注销存在问题。 SFAuthenticationSession 不提供清除 cookie 的方法。因此,当我再次调用 SFAuthenticationSession.start() 时,我会获得带有身份验证令牌的先前回调 url,而不是允许用户提供新凭据。
作为一种解决方法,我用SFAuthenticationSession.start() 调用login.microsoftonline.com/common/oauth2/logout。它有效,但 UX 体验比糟糕还糟糕。
真的没有其他方法可以用SFAuthenticationSession 清除cookie吗?会话不与 Safari 共享,因此打开 web 视图也不起作用。
ASWebAuthenticationSession 代替 SFAuthenticationSession 是否允许以某种方式清除 cookie?
我知道已经在 SO 上提出了非常相似的问题,但也许有关于这个主题的一些更新。
【问题讨论】:
标签: ios swift oauth alamofire aswebauthenticationsession