Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

72
Views
React Google Login Error: 400 on mobile devices

I'm using the React Google Login package to authenticate users for my site. It works fine on desktop but when I test it out on mobile I am getting Error 400: redirect_uri_mismatch. I've made sure all my URIs are correct in the API credentials. I'm having a hard time understanding why it will work on desktop but not on mobile.

7 months ago · Juan Pablo Isaza
1 answers
Answer question

0

The redirect_uri_mismatch error message is very common. The redirect uri is used in web applications to tell the server where to return the authorization code to.

When a web application launches the consent screen and the user consents to authorization by defining a redirect uri the authorization sever knows where on your web server the application is able to handle the authorization code exchange step. For it to work properly each redirect uri for your web application must be registered exactly in Google cloud console for your project. This means HTTPS vs HTTP as well as ports and trailing slashes are important. How to fix redirect uri missmatch

True mobile login does not have a redirect uri, Client sided JavaScript applications also do not have a redirect uri they have a JavaScript origin.

Its hard to help you more without seeing your code but you may be mixing things a little.

For a web application you should have configured a web client on Google cloud console, if its back end then you should have a redirect uri, if its client side JavaScript then you should have added a JavaScript origin.

If you have a mobile application android or ios then you should have crated a mobile client. Which would not require a redirect uri.

7 months ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.