代码之家  ›  专栏  ›  技术社区  ›  Mobile Developer

如何使用SFAuthenticationSession注销

  •  0
  • Mobile Developer  · 技术社区  · 6 年前

    SFAuthenticationSession 使用SSO登录到 login.microsoftonline.com . 它工作得很好,但是注销时有一个问题。 SFAuthenticationSession 不提供清除Cookie的方法。所以当我打电话 SFAuthenticationSession.start() 同样,我得到了以前的回调url,它带有身份验证令牌,而不是允许用户提供新的凭据。

    我称之为解决办法 login.microsoftonline.com/common/oauth2/logout SFA公司AuthenticationSession.start() . 它是有效的,但用户体验更糟糕。

    真的没有其他方法来清除饼干吗 SFAuthenticationSession

    ASWebAuthenticationSession SFAuthenticationSession 允许清除cookies吗?

    1 回复  |  直到 6 年前
        1
  •  2
  •   canister_exister    6 年前

    注销的唯一方法是打电话 login.microsoftonline.com/common/oauth2/logout 或者,如果希望在应用程序之间使用sso,则可以使用WKWebView,但如果希望在Safari和应用程序之间使用sso,则唯一的方法是ASWebAuthenticationSession或SFAuthenticationSession。ASWebAuthenticationSession与SFAuthenticationSession相同,但它们添加了权限警报视图,当您需要注销时,用户将看到带有问题的警报视图:是否要登录?希望苹果能解决它