<!--
{
  "availability" : [
    "iOS: 11.0.0 - 12.0.0",
    "iPadOS: 11.0.0 - 12.0.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "SafariServices",
  "identifier" : "/documentation/SafariServices/SFAuthenticationSession/cancel()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Safari Services"
    ],
    "preciseIdentifier" : "c:objc(cs)SFAuthenticationSession(im)cancel"
  },
  "title" : "cancel()"
}
-->

# cancel()

Cancels the currently running session when the consent dialog is up or when the webpage is up. This is how applications stop the login process.

```
func cancel()
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)