Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 400: redirect_uri_mismatch when distributing Xamarin Forms App

I am trying to distribute my Xamarin Forms Android app via the Google Play Store in Visual Studio 2019.

I follow this tutorial by Microsoft: https://docs.microsoft.com/en-us/xamarin/android/deploy-test/publishing/publishing-to-google-play/?tabs=windows

I went through the steps of setting up a Google Developer Account as well as creating an application in the google dev console and an OAuth2 client.

I then entered the Client ID and Client Secret into the form and tried to register. Instead of being forwarded to the authorization page, I saw this error: Error 400: redirect_uri_mismatch

Unfortunately, I cannot just add the uri to the OAuth2 client, as the port changes every time I try to register button.

So, how can I solve this issue? Can I somehow fix the port that Visual Studio/Xamarin Forms uses? Is there an entirely different approach?

Your help is greatly appreciated.

like image 663
JamesButler Avatar asked Oct 28 '20 16:10

JamesButler


1 Answers

you need to create a Desktop App credential not a Web App in order to register from Visual Studio

like image 156
VEGA Avatar answered Oct 29 '22 06:10

VEGA