Skip to content

Instantly share code, notes, and snippets.

@Yoloabdo
Last active June 5, 2020 14:06
Show Gist options
  • Select an option

  • Save Yoloabdo/d357a9552ac84c956c2811d5b3fd96fd to your computer and use it in GitHub Desktop.

Select an option

Save Yoloabdo/d357a9552ac84c956c2811d5b3fd96fd to your computer and use it in GitHub Desktop.
protocol AuthServiceDelegate: AnyObject {
var userAuthenticator: UserAuthenticator { get }
/// Fired when user is authorised and confirmed via backend, returning user-info.
/// - Parameters:
/// - authService: service type.
/// - user: user info object.
func authService(_ authService: PreferredAuthMethod, didAuthenticate user: UserInfo)
/// Reporting auth failure, with service and error.
/// - Parameters:
/// - authService: service type.
/// - error: errors.
func authService(_ authService: PreferredAuthMethod, didFailToAuthorizeWith error: Error)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment