Using multiple authentication providers and persisting a user's preferred profile image
Commonly in web application, we want to make it as easy as possible for new or existing users to authenticate and interact with our application, letting users choose their preferred way of identifying themselves. In this recipe, we will use Twitter, Google, and Facebook OAuth providers together and allow users to set a preferred profile image. This will show how ServiceStack's UserAuth
database tables can be extended as well as how they interact when multiple providers are added.
Getting ready
In this example, you will need to already have API keys for the authentication providers we will use: Twitter, Facebook, and Google. If you are unsure how to obtain these API keys, please see previous recipes in this chapter, which will help you to get started with each provider.
Also, we are going to need an application to integrate. We will start with a template from the ServiceStackVS Visual Studio extension. If...