2
votes

I can configure different Authentication Providers in Azure Mobile App: Google, Facebook, Twitter, Microsoft and AAD.

But how I can use them together? I want for user to be able choose which provider he wants to use, but in dropdown list I can choose only one action (Action to take when request is not authenticated), which forward user or to Google or Facebook (or other providers).

Should I create Mobile App for each provider?

1

1 Answers

2
votes

Probably your best idea here is to use another facility like Auth0 for the authentication pop-up. Configure Auth0 and Azure Mobile Apps with the same client ID, client Secret and scopes for all four social clients (plus AAD).

To effect a login, do the Auth0 thing - the IdP identity will be located in the profile returned by Auth0. You can then call the appropriate Azure Mobile Apps Client SDK login routine in a client flow (login or LoginAsync or whatever) with the provider and the access_token returned by the IdP and provided in the identities array by Auth0.

When you configure the identity providers at the IdP level, ensure you include both the Auth0 callback and the Azure App Service /.auth/provider/login/callback in the redirect URLs.

I'll have a blog post on my blog at http://shellmonger.com in a few days about this topic, since it is a little complex.