O'Reilly logo

Mastering Xamarin.Forms by Ed Snider

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 in to Facebook via the IAuthService, passing the received Facebook token to the Azure backend service through the ITripLogDataService, and then storing the Azure access token in local settings.

Note

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 location service: creating a core interface that is implemented uniquely per platform. Another alternative is to leverage a plugin or other third party component that has been published. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required