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 theViewModels
folder in the core library project:public class SignInViewModel : BaseViewModel { }
- Update the
SignInViewModel
with a constructor that takes inINavService
,IAuthService
, andITripLogDataService
parameters:public class SignInViewModel : BaseViewModel { readonly IAuthService _authService; readonly ITripLogDataService _tripLogService; public SignInViewModel(INavService navService, IAuthService authService, ITripLogDataService tripLogService) :base...