Securing the Backing API of Your Xamarin App With Social Logins and ASP.NET Core 2, Part 2

In the previous article, we created a new web application with ASP.NET Core 2 using the “ASP.NET Core Web Application” template and added “Individual User Accounts” authentication. We then stripped the ability to create users with passwords in the application. Now we’ve got a running web application that won’t allow us to log on to. We could configure external authentication providers now, but first, we need to add SSL support.

Read More »

Securing the Backing API of Your Xamarin App With Social Logins and ASP.NET Core 2, Part 1

So you’ve got a Xamarin app that calls a REST API you wrote with ASP.NET Core 2 and you want users to be able to log in to your app with Google, Facebook or Twitter accounts? And you also want that login to happen on the server, not just in your app? In this series I will explain my approach.

Read More »

Xamarin on Android: Bypass SSL Verification With HttpClient

To disable SSL verification while making HTTP calls with System.Net.Http.HttpClient in a Xamarin app on Android, you need to supply a SSLSocketFactory and a custom implementation of HostnameVerifier with all checks disabled. To do this, you’ll need to  subclass AndroidClientHandler and override the appropriate methods.Read More »

ASPNETCORE 2.0 Identity – Redirect URL signin-* Returns 404

When creating an ASP.NET Core web application using the web app template in VS 2017 preview, a web application with ASP.NET Core 1.1 is scaffolded. Adding external authentication providers following this or this instruction works like a charm. But then, after migrating to ASP.NET Core 2.0, the redirect URL getting the user from the external auth provider back to the web app (i.e. /signin-microsoft, /signin-google, /signin-facebook etc.) stopped working and resulted in a 404.

Read More »

Xamarin: Failed to create JavaTypeInfo for class … due to System.NullReference Exception

In my Xamarin\Android project, I wanted to use a WebView and add a JavascriptInterface to enable communication between my app and the JavaScript inside the WebView. I found an example here which was quite easy and straight forward. To explore things a little bit more, I wanted to add a JavaScript-callable method that accepts a parameter of type System.Object, call it with random objects from JavaScripts and see what these JavaScript objects transform to in the .NET world.Read More »