Adding a sign in page

In order to add sign in capabilities to our app, we will need to create a new Page and a new ViewModel. The ViewModel will be pretty straightforward, containing just a single command that handles signing in to Facebook via the IAuthService interface, passing the received Facebook token to the Azure backend service through the ITripLogDataService, and then storing the Azure access token in local settings.

There are a couple of ways to tap into the local storage platform-specific APIs to store settings. One way is to roll your own, similar to how we did the geolocation service: creating a core interface that is implemented uniquely per platform. Another alternative is to leverage a plugin or other third-party library that ...

Get Mastering Xamarin.Forms - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.