On my ASP.NET page, I am attempting to implement Google login using my clientID and a specified redirect_uri in the Google Console. However, when I try to log in, I encounter the following error.
Error: 400. That’s an error.
Error: redirect_uri_mismatch
Application: odiyaDoctor
You can email the developer of this application at: [email protected]
The redirect URI in the request: http://localhost/immediateHelp.aspx did not match a registered redirect URI.
This functionality requires users to log in through Google on the first page (UserLogin.aspx
) and then be redirected to the next page (i.e.immediateHelp.aspx
) upon successful login. Below, I provide all relevant code and Google credentials.
UserLogin.aspx:
<a href="#" class="btn btn-large btn-block btn-google" onclick="googleLogin();" >Login with Google <i class="fa fa-google-plus"></i></a>
<script>
// Relevant JavaScript code
</script>
On the UserLogin.aspx page, I encountering the following error within the catch section:
at http://localhost:3440/UserLogin.aspx:92:32 UserLogin.aspx:103 its error DOMException: Blocked a frame with origin "http://localhost:3440" from accessing a cross-origin frame. at Error (native)
clientID set in google.
Client ID for web application
Client ID
***************************************1ctsjaeg96b1elfa8.apps.googleusercontent.com
Client secret
*********oGbT13hv3S
Redirect URIs
https://localhost/immediateHelp.aspx
JavaScript origins
https://localhost
I aim for seamless redirection to the immediateHelp.aspx
page upon successful user login, followed by an option for logout on that page. Any assistance in resolving these issues would be greatly appreciated.