Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #210 from Sage-Bionetworks/syoung/sign-out
Browse files Browse the repository at this point in the history
Send notification on signout
  • Loading branch information
syoung-smallwisdom authored Apr 17, 2023
2 parents 8af775a + 5ccfe40 commit fd8936d
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,20 @@ open class UploadAppManager : ObservableObject {
/// Sign out the current user.
@MainActor
public final func signOut() {
NotificationCenter.default.post(name: Self.BridgeClientWillSignOut, object: self)
willSignOut()
updateUserSessionStatus(nil, updateType: .signout)
authManager.signOut()
didSignOut()
NotificationCenter.default.post(name: Self.BridgeClientDidSignOut, object: self)
}

/// A notification that the participant is about to be signed out.
public static let BridgeClientWillSignOut: Notification.Name = .init("BridgeClientWillSignOut")

/// A notification that the participant has been signed out.
public static let BridgeClientDidSignOut: Notification.Name = .init("BridgeClientDidSignOut")

/// The current user will sign out.
/// @Protected - Only this class should call this method and only subclasses should implement.
@MainActor
Expand Down

0 comments on commit fd8936d

Please sign in to comment.