Adding a sign-in page
In order to add sign-in capabilities to our app, we need to create a new Page and a new ViewModel. The ViewModel will be pretty straightforward, containing just a single command that handles signing into Facebook via the IAuthService interface, and passing the received Facebook token to the Azure backend service through the ITripLogDataService, as shown in the following steps:
- Create a new class that inherits from
BaseViewModel, namedSignInViewModel, in theViewModelsfolder in the core library project:public class SignInViewModel : BaseViewModel { } - Update the
SignInViewModelwith a constructor that takes inINavService,IAuthService, andITripLogDataServiceparameters:public class SignInViewModel : BaseViewModel { readonly IAuthService _authService; readonly ITripLogDataService _tripLogService; public SignInViewModel(INavService navService, IAuthService authService, ITripLogDataService tripLogService) :base...