Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

OAuth2 Microsoft/Google authentication Xamarin Forms

$
0
0

I'm building an app that should be able to send emails. I'm using OAuth2 to verify the user, and I've looked at the Xamarin Forms Sample which works great with gmail after setup. However it doesn't work with my Microsoft account.

I've created a cliendId and all that stuff on Microsoft. Do I have to have a Azure AD as well?

I'm calling the authentication with:

new OAuth2Authenticator(
                "myClientId",
                "User.Read",
                new Uri("https://login.live.com/oauth20_authorize.srf?client_id=myid&scope=user.read&response_type=token&redirect_uri=https://login.live.com/oauth20_desktop.srf"),
                new Uri("myRedirectUri"),
                null,
                true);

But am reaching a screen saying: We cannot perform your request. Microsoft-accounts is having technical issues right now. Try again later.

Have looked at this sample, where the author uses Google and Microsoft accounts in similar ways.

If I'm instead using this sample it works with the original setup, but not if I change to my own clientId and redirectUrl. Is this since I don't have any Azure account? Would not like to pay to get it, and since the first approach works fine with my gmail I would love if it could work with Microsoft as well.

/Oliver


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>