How to use OAuthLoginPresenter in Xamarin.Forms OAuth authentication

2379
4
06-27-2018 03:47 AM
ManoSadeh
New Contributor II

Hey,

How can we use OAuthLoginPresenter in Xamarin.Auth (Xamarin.Forms) to authenticate with ArcGIS Protal/Online?

With the OAuthLoginPresenter we have a login process to UWP (all esri examples shows Android and iOS, no UWP) with a simple work flow.

Thanks! 

0 Kudos
4 Replies
ManoSadeh
New Contributor II

Another option is to implements a custom Renderer to Xamarin.Auth.XamarinForms.AuthenticatorPage() to support authenticating to ArcGIS Portal in Xamarin.Forms for UWP, Android and iOS

0 Kudos
JenniferNery
Esri Regular Contributor

Have you seen this SDK sample using `Xamarin.Auth.OAuth2Authenticator`? Android, iOS and UWP have their own page renderer that deals with presenting UI when challenge for credential occurs.

0 Kudos
MaraStoica4
Occasional Contributor

There's also the Maps App Example App that shows using OAuth2 in Xamarin Forms: UWP, iOS and Android.  

0 Kudos
ManoSadeh
New Contributor II

Thanks!

Those example are very close be the scenario we looking for is, presenting the Login screen as the first screen to authentication for accessing the application. The UWP example shows the login screen as a popup. This is why we think the PageRender approach in iOS and Android can also be a good solution for UWP.

Overall, I think an "AuthenticatorPageRender" examples for iOS, Android and UWP can be very useful. (similar to Xamarin.Auth.XamarinForms.AuthenticatorPage).

Thanks,

Mano 

0 Kudos