Skip to content

fix(swift): update signout code snippet #7630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/fragments/lib/auth/ios/signout/10_local_signout.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ func signOutLocally() async {
// Sign Out completed with some errors. User is signed out of the device.

if let hostedUIError = hostedUIError {
print("HostedUI error \(String(describing: hostedUIError))
print("HostedUI error \(String(describing: hostedUIError))")
}

if let globalSignOutError = globalSignOutError {
// Optional: Use escape hatch to retry revocation of globalSignOutError.accessToken.
print("GlobalSignOut error \(String(describing: globalSignOutError))
print("GlobalSignOut error \(String(describing: globalSignOutError))")
}

if let revokeTokenError = revokeTokenError {
// Optional: Use escape hatch to retry revocation of revokeTokenError.accessToken.
print("Revoke token error \(String(describing: revokeTokenError))
print("Revoke token error \(String(describing: revokeTokenError))")
}

case .failed(let error):
Expand Down Expand Up @@ -64,17 +64,17 @@ func signOutLocally() -> AnyCancellable {
case let .partial(revokeTokenError, globalSignOutError, hostedUIError):
// Sign Out completed with some errors. User is signed out of the device.
if let hostedUIError = hostedUIError {
print("HostedUI error \(String(describing: hostedUIError))
print("HostedUI error \(String(describing: hostedUIError))")
}

if let globalSignOutError = globalSignOutError {
// Optional: Use escape hatch to retry revocation of globalSignOutError.accessToken.
print("GlobalSignOut error \(String(describing: globalSignOutError))
print("GlobalSignOut error \(String(describing: globalSignOutError))")
}

if let revokeTokenError = revokeTokenError {
// Optional: Use escape hatch to retry revocation of revokeTokenError.accessToken.
print("Revoke token error \(String(describing: revokeTokenError))
print("Revoke token error \(String(describing: revokeTokenError))")
}

case .failed(let error):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,17 +265,17 @@ func signOutLocally() async {
// Sign Out completed with some errors. User is signed out of the device.

if let hostedUIError = hostedUIError {
print("HostedUI error \(String(describing: hostedUIError))
print("HostedUI error \(String(describing: hostedUIError))")
}

if let globalSignOutError = globalSignOutError {
// Optional: Use escape hatch to retry revocation of globalSignOutError.accessToken.
print("GlobalSignOut error \(String(describing: globalSignOutError))
print("GlobalSignOut error \(String(describing: globalSignOutError))")
}

if let revokeTokenError = revokeTokenError {
// Optional: Use escape hatch to retry revocation of revokeTokenError.accessToken.
print("Revoke token error \(String(describing: revokeTokenError))
print("Revoke token error \(String(describing: revokeTokenError))")
}

case .failed(let error):
Expand Down Expand Up @@ -307,17 +307,17 @@ func signOutLocally() -> AnyCancellable {
case let .partial(revokeTokenError, globalSignOutError, hostedUIError):
// Sign Out completed with some errors. User is signed out of the device.
if let hostedUIError = hostedUIError {
print("HostedUI error \(String(describing: hostedUIError))
print("HostedUI error \(String(describing: hostedUIError))")
}

if let globalSignOutError = globalSignOutError {
// Optional: Use escape hatch to retry revocation of globalSignOutError.accessToken.
print("GlobalSignOut error \(String(describing: globalSignOutError))
print("GlobalSignOut error \(String(describing: globalSignOutError))")
}

if let revokeTokenError = revokeTokenError {
// Optional: Use escape hatch to retry revocation of revokeTokenError.accessToken.
print("Revoke token error \(String(describing: revokeTokenError))
print("Revoke token error \(String(describing: revokeTokenError))")
}

case .failed(let error):
Expand Down
Loading