LazyStack

AuthProcess Class

The AuthProcess class is a wrapper around IAuthProvider that implements an INotifyPropertyChanged to provide bindable properties and events suitable for use in an event driven UI.

The AuthProcess class adds many bindable properties to make using the authentication processes in a UI easy. Some of the more critical of these include:

  • string Login
  • string NewLogin
  • string Password
  • string NewPassword
  • string Email
  • string NewEmail
  • string Phone
  • string NewPhone
  • string Code

Instead of calling a verify method, like AuthProvider.VerifyLoginAsync(string login), you call AuthProcess.VerifyLoginAsync() which then calls the AuthProviderVerifyLoginAsync(string login) method, passing in the current value of the AuthProcess.Login property.

This approach assumes you collect the login value in the bound Login property and call VerifyLoginAsync() when the user commits the field entry. The provided Xamarin app provides a fully functional example of this technique for all AuthProcess processes, challenges and properties.

Rather that provide a lengthy discussion of AuthProcess here, we encourage you to examine the Xamarin example and AuthProcess class code. Both are very simple and largely self-explanatory.