How the fix redirect_uri_mismatch error.

Поделиться
HTML-код
  • Опубликовано: 14 окт 2024
  • In this video, you will learn how to fix the redirect_uri_mismatch error when using Google OAuth. This is a common error that can occur when the redirect URI specified in the authorization request does not match the URI registered in the Google Cloud Console.
    This video will show you how to check the authorized redirect URIs for your OAuth client ID and how to add new redirect URIs if needed. You will also learn how to troubleshoot the redirect_uri_mismatch error if you are still having problems.
    This video is perfect for anyone who is using Google OAuth and is experiencing the redirect_uri_mismatch error. You don't need any prior experience with Google OAuth to follow along.
    Here are some of the things you will learn in this video:
    What is the redirect_uri_mismatch error?
    How to check the authorized redirect URIs for your OAuth client ID
    How to add new redirect URIs to your OAuth client ID
    How to troubleshoot the redirect_uri_mismatch error
    If you are using Google OAuth and are experiencing the redirect_uri_mismatch error, then this video is for you!
    Additional tips for fixing the redirect_uri_mismatch error:
    Make sure that the redirect URI specified in the authorization request matches the URI registered in the Google Cloud Console exactly. This includes the scheme, domain, and port.
    Check for any trailing slashes in the redirect URI. Trailing slashes can cause the redirect_uri_mismatch error.
    Try clearing your browser's cache and cookies.
    If you are using a development environment, make sure that the redirect URI is accessible to the public.
    If you are still having problems fixing the redirect_uri_mismatch error, please contact Google support for assistance.
    🔥 How to find me 🔥
    🔗 Support my work on patreon: / daimto
    🔗 Daimto Stack Overflow: stackoverflow....
    📓 Website and tutorials: Daimto.com www.daimto.com/
    🐦 Twitter: @LindaLawtonDK
    🐙 GitHub: github.com/Lin...
    👍 Facebook / daimtocom
    #daimto #googleDeveloperExpert #googleDevelopers #LindaLawton

Комментарии • 183

  • @hasank4531
    @hasank4531 3 года назад +30

    You are a life saver. It is currently 3.45am I was about to go crazy! Thanks a lot!!!

  • @MsToshinori
    @MsToshinori 8 месяцев назад +2

    You're very welcome! I'm glad I could help you figure it out. It sounds like you were struggling with domain settings and environment variables, but after following the suggestion to check credentials. After your suggestion I created credentials, and upon checking, I found that these addresses automatically go to trusted domains. Thank you very much.

  • @guitarmeetsscience
    @guitarmeetsscience Год назад +2

    After some hours trying to figure this out you show me in less than 2 minutes. Awesome! New fan here!

  • @futuregootecks
    @futuregootecks Год назад

    OMG thank you so much for this!!!!! I was going crazy trying to figure it out and it was the trailing slash the entire time!! Now I'm getting a Error 403: org_internal, but it's progress and I'm pretty sure I can figure that one out cuz I think I've done it before

  • @howtodovideoz
    @howtodovideoz 29 дней назад

    While I am developing a chrome extension using visual studio, I couldn't find the Authorized Redirect Url in the credential menu. I has just the Name and Item ID
    can you help?

    • @DaimtoAps
      @DaimtoAps  19 дней назад

      Aren't chrome extensions client side javascript

  • @boazyahav9529
    @boazyahav9529 2 года назад +1

    Hi
    This did not work for me.
    I'm trying to connect a server script to FCM so in the 1st place, i don't understand why there is a need for a redirect URI.
    There is no web interface... just a server side script trying to access FCM services via OAUTH 2.
    I also tried to add $client->setAccessType('offline'); which does work with Google services accessing GMAIL. but here it insists on a RedirectUri.
    I get Access blocked: project-xxxxxxxxxxxxx’s request is invalid
    Error 400: redirect_uri_mismatch
    There is no reference no any link.

    • @DaimtoAps
      @DaimtoAps  2 года назад

      if it's running on a server and your only accessing a single account you have control of. try using a native installed client. then authorize the app on your machine store the refresh token in a file you code can read then upload both to the server.
      if you want open a question on Stack Overflow I will try to help you debugging you redirect uri issue

  • @thamirisvicente1292
    @thamirisvicente1292 Месяц назад

    you saved me. THANK YOU SO MUCH!

  • @noah5291
    @noah5291 8 месяцев назад

    Hello, i think this almost gets me to a fix. The issue is, is that my error does not actually tell me which port to use. Additionally, the link that it tries to take me to is just to my account (totally useless and messy Google). I did notice that the URL that opens up the auth flow seems to pass a URI through that does have a local host and port that I was not using. Going to give that a shot. If that works, that might be a good update process for users if you feel like making another video, as i'm assuming this is across the board for users who run into this. Thank you!

    • @DaimtoAps
      @DaimtoAps  8 месяцев назад

      I would like to here more did you get it working

    • @noah5291
      @noah5291 8 месяцев назад

      @@DaimtoAps hello. I've solved the issue with the new layout login UI. In Python, when going through the oath flow, it opens up a URL which it displays in CMD. I saw that the local host with port being displayed there was not matching what was defined in Google Cloud Console Redirect URI. Additionally the port in that URL kept changing. I was able to resolve the issue by creating creds like this and one other thing:
      creds = flow.run_local_server(port=250)
      Before it said port=0, which I think was making it dynamically change the port leading to the mismatch 400 error.
      I then defined 250 as being my localhost uri redirect in Google Cloud Console by editing the credential from platform.
      I did it in two ways:
      localhost:250/
      localhost:250
      Probably best to not use a port in use but clearly I'm no IT person. I have a feeling this whole issue is obvious to more experienced coders/devs but to people who use coding to solve for gaps, since it currently is not explained anywhere in Google documentation, it's a real hole to fall down.
      If you want to pin this comment that might really save some people some suffering, do as you please though. Thank you!

  • @sreejithp1119
    @sreejithp1119 2 года назад +1

    thank u, never thought it was this simple. Currently developing a website in wordpress.

    • @DaimtoAps
      @DaimtoAps  2 года назад +1

      Glad you got it working. Good luck with your site

  • @chriskarnes3410
    @chriskarnes3410 6 месяцев назад

    Removing the trailing slash worked. Thank you so much!

    • @DaimtoAps
      @DaimtoAps  6 месяцев назад

      That is the most common error I see

  • @checkitoutna
    @checkitoutna 3 месяца назад +1

    My blazer app run on port 5157, and I can see it correctly in the browser. I got this mismatch url, but in the error message, it shows me different port every time. It’s not 5157 as shown in browser. Please help.

    • @DaimtoAps
      @DaimtoAps  3 месяца назад

      You need to fix your ide to stop running on random ports it needs to be a static port

    • @checkitoutna
      @checkitoutna 2 месяца назад

      @@DaimtoAps thank!

  • @blueandraedevera8084
    @blueandraedevera8084 2 года назад +2

    Thank you so much for this! Apparently, my "http" doesn't have an "s", lol. I copied the whole thing and it worked!

    • @DaimtoAps
      @DaimtoAps  2 года назад

      thats almost as common as having a trailing / its happened to me often

  • @Hormazda
    @Hormazda 9 месяцев назад

    It worked... Thanks for this helpful video👌

  • @brook8532
    @brook8532 3 месяца назад

    😢Hi I need help, when I go to credentials the Page dont show me Any client id 0auth to edit. What can I do??

  • @evalanguaria6214
    @evalanguaria6214 2 года назад +1

    Hello. Thank you for the informative video. Do you have a video on a similar issue but with desktop app credentials instead of web apps?

    • @DaimtoAps
      @DaimtoAps  2 года назад

      a desktop app doesn't have a redirect uri in this manner it defaults to localhost or 127.0.0.1

    • @gggmichael2561
      @gggmichael2561 2 года назад

      @@DaimtoAps yes but both localhost and 127.0.0.1 result in a redirect uri mismatch error

    • @DaimtoAps
      @DaimtoAps  2 года назад

      open your credetnails.json. check what is set as redirect URIS and that its for an installed app and not web. Delete any redirect uri that is not "localhost" then try again. If it still doesn't work pop your code up on stack overflow and i will have a look

  • @greendsnow
    @greendsnow 2 года назад

    Google should give this lady an award

    • @DaimtoAps
      @DaimtoAps  2 года назад

      They have I'm a Google developer expert 👋

    • @greendsnow
      @greendsnow 2 года назад

      @@DaimtoAps Raise her paycheck Google!

  • @rohansundram3784
    @rohansundram3784 Год назад

    Thank you! This solved a problem I have had for 2 days! You're amazing!

  • @MakeIndiaSmart
    @MakeIndiaSmart Год назад

    After going thru a lot many videos, finally this video gave me the solution.

    • @DaimtoAps
      @DaimtoAps  Год назад

      Im glad it helped. What are you working on?

  • @davidbisignani4511
    @davidbisignani4511 2 года назад

    This did not work for me. I added the slashes as directed but Google raised an exception - telling me that slashes are not permitted in the URL. I do not know why it is objecting to a forward slash as this seems correct.

    • @DaimtoAps
      @DaimtoAps  2 года назад

      Try again I think there may have been a bug I saw a few people having issues

  • @noulayfer9012
    @noulayfer9012 Год назад

    That is the best video i`ve ever seen in my life.

  • @PaulinaEguibar
    @PaulinaEguibar Год назад

    I'm having this issue but in my java application, but every time I run it it throws a different uri, how can I fix this?? thanks

    • @DaimtoAps
      @DaimtoAps  Год назад

      you need to configure your application to run with a fixed url and port.

  • @GregXHunterz
    @GregXHunterz 2 года назад

    Hey so I'm dealing with this exact same error and I tried the redirect_uri but for some reason each time i try running my application again it keeps returning a different port number, making my url different every time I run it. So even if I add the url to the redirect_uri it'll just show a different port every time I run it. How do you solve this problem?

    • @DaimtoAps
      @DaimtoAps  2 года назад

      it's your ide you need to configure it to use a static port

    • @amirbaha2ri
      @amirbaha2ri 2 года назад

      @@DaimtoAps May you explain more? I have the same issue and couldn't find any solution

  • @RF-vz3di
    @RF-vz3di Год назад

    I am trying to run my application on localhost in Visual Studio and noticed that the port keeps changing and hence I keep getting the redirect_uri_mismatch.I have tried multiple options .Could you please advise of how I could resolve this!

    • @DaimtoAps
      @DaimtoAps  Год назад +1

      You need to configure visual studio to run with a static port.

    • @RF-vz3di
      @RF-vz3di Год назад

      thank you !!

  • @pasbandream
    @pasbandream 2 года назад

    Hello mam thnx to share but when i am trying this with wordpress social login plugin it is 400 error and returning uri...but changing the uri even it is not working.

    • @DaimtoAps
      @DaimtoAps  2 года назад

      put up a question on Stack Overflow with your code I will be happy to help

  • @perflyckt9470
    @perflyckt9470 2 года назад

    Hi,
    I'm constantly getting different redirect URI ports when running ASP.NET Core in the Visual Studio debugger.
    How can I solve this issue ?

    • @DaimtoAps
      @DaimtoAps  2 года назад

      its your settings in visual studio you need to fix it there.

  • @bgsbgfxbbbbvcvc
    @bgsbgfxbbbbvcvc Год назад

    omg i was about to go crazy here because of this, Thank you!!!!

  • @salmaindrianputri164
    @salmaindrianputri164 Год назад

    I have no issue with localhost. But error appear when i use live url.
    It stated that i should use localhost, but it completely wrong becaut I use live domain. Any fix miss?

    • @DaimtoAps
      @DaimtoAps  Год назад

      Your app isn't configured to use the domain its running local Host

    • @salmaindrianputri164
      @salmaindrianputri164 Год назад

      @@DaimtoAps how can i configure iy please my savior..

    • @DaimtoAps
      @DaimtoAps  Год назад

      That depends on the language you are using

    • @salmaindrianputri164
      @salmaindrianputri164 Год назад

      @@DaimtoAps i use typescript next js with next oauth brother

  • @francispaolomarty8725
    @francispaolomarty8725 2 года назад

    hi! Do you have tutorials on how to fix Error 401: deleted_client. I have created a new web application but still encounter the same problem.

    • @DaimtoAps
      @DaimtoAps  2 года назад

      if its deleted you need to make a new one

  • @mrchilled85
    @mrchilled85 Год назад

    thank you for that great info i did not know i had to put the path back to my oauth.php for the redirect

    • @DaimtoAps
      @DaimtoAps  Год назад +1

      I'm glad it helped unfortunately google dosent document this critical step

    • @mrchilled85
      @mrchilled85 Год назад

      @@DaimtoAps i know i have been looking over all the doc's they have as im new to php and html and building a website just from stuff i have worked out and been driving me mad this morning to work out why google login was not working tho facebook login was working fine

  • @HSBTechYT
    @HSBTechYT 2 года назад

    I have added the redirect uri in my console, but sometimes it still throws the same message, It works great 8/10 times but 2 times it shows this error.

    • @DaimtoAps
      @DaimtoAps  2 года назад

      are you using a library or are you doing it manually?

    • @HSBTechYT
      @HSBTechYT 2 года назад

      @@DaimtoAps I did it manually. It's working now. It took around 6 hours to propogate everywhere I think

    • @DaimtoAps
      @DaimtoAps  2 года назад

      I'm impressed not many of us get it working manually. Client libraries are the easiest way. glad you got it working ☺️

    • @HSBTechYT
      @HSBTechYT 2 года назад

      @@DaimtoAps There is a client library for react but it uses cookies . But new iPhones and new chorme updates on Android blocks third party cookies.
      So client side Google auth doesn't work for all phones.
      So had to implement server side oauth

    • @DaimtoAps
      @DaimtoAps  2 года назад

      have you posted sn issue over on the issue forum for the library. seems like something they could fix.

  • @edgaras.neverdauskas
    @edgaras.neverdauskas 2 года назад +1

    Thank you, you just guided me in the right direction

  • @ammarrajput3348
    @ammarrajput3348 Год назад

    hi i am using google login in socialite following your lecture there is a uri mismatch redirect error coming can you guide please?

    • @DaimtoAps
      @DaimtoAps  Год назад

      the error message should tell you what redirect URI you are missing

    • @ammarrajput3348
      @ammarrajput3348 Год назад

      @@DaimtoAps I am using Laravel 9

    • @ammarrajput3348
      @ammarrajput3348 Год назад

      @@DaimtoAps would you clear me that should I have give the /api/ instance on redirect url of google developer console?

    • @ammarrajput3348
      @ammarrajput3348 Год назад

      @@DaimtoAps solved it by myself thanks for your video it helped me alot

  • @clickwiseowl
    @clickwiseowl 8 месяцев назад

    Thank You, super useful.

  • @joey.9.5
    @joey.9.5 3 года назад

    Thanks a bunch I just needed to know where to add the redirect URL xD

  • @zendonegan5470
    @zendonegan5470 3 года назад

    mine isn't working in production? do I need to do something different?

    • @DaimtoAps
      @DaimtoAps  2 года назад

      its should be the same solution just remember to us https

  • @ariffathurrohman8310
    @ariffathurrohman8310 8 месяцев назад

    i dont understand what you fix, can you explain in this comment?

    • @DaimtoAps
      @DaimtoAps  7 месяцев назад

      I showed you how to fix the redirect uri in your project

  • @heshamfm
    @heshamfm 8 месяцев назад

    My error says this:
    You can’t sign in because this app sent an invalid request.
    [email here]
    You can try again later, or contact the developer about this issue. Learn more about this error
    If you are a developer of this app, see error details.
    Error 400: redirect_uri_mismatch
    Is this server side or client side?

    • @DaimtoAps
      @DaimtoAps  8 месяцев назад

      Unless it says JavaScript origin its server side

  • @gangulanikhilreddy3900
    @gangulanikhilreddy3900 3 года назад

    how can i get a redirect url for mobile apps. Can you plz help me out

    • @DaimtoAps
      @DaimtoAps  3 года назад

      as far as I know mobile apps should not need a redirect URI its a different type of authorization

  • @davidsilva7302
    @davidsilva7302 3 года назад

    how edo I fix "You do not have sufficient permissions to view this page
    " please

    • @DaimtoAps
      @DaimtoAps  3 года назад

      Depending upon which API you are talking about it sounds like you need the owner to grant you access

  • @cruxrobot7034
    @cruxrobot7034 Год назад

    i don't have any option in web client. How then i fix the problem

    • @DaimtoAps
      @DaimtoAps  Год назад

      are you sure its a web client?

  • @checkprices.online5662
    @checkprices.online5662 3 года назад +1

    Its worked!!. Thank you!!

    • @DaimtoAps
      @DaimtoAps  3 года назад

      That's great news. Good luck with your application. 👏

  • @nidhiinsight
    @nidhiinsight Год назад

    I have done this localhost but how I can authorize on client https server (host). Please help.

    • @DaimtoAps
      @DaimtoAps  Год назад

      you just need to add the redirect URI for your web domain

    • @nidhiinsight
      @nidhiinsight Год назад

      @@DaimtoAps Thanks but it is not working as a redirect url mismatch error encounter. As we are calling run_local_server in the code may be this is the reason

    • @DaimtoAps
      @DaimtoAps  Год назад

      the code needs to run on the server

    • @nidhiinsight
      @nidhiinsight Год назад

      @@DaimtoAps Then what function we will use instead of run_local_server where I can pass my server link

    • @DaimtoAps
      @DaimtoAps  Год назад

      depends on the language I would think sounds like you are using Python I normally use flask

  • @robertob6996
    @robertob6996 2 года назад

    Please add a playlist for Google Directory Service

    • @DaimtoAps
      @DaimtoAps  2 года назад

      Ok what exactly are you doing with Directory service?

  • @Celine7094
    @Celine7094 3 года назад

    Its really worked!!! Love you sooooo much

  • @westlymeza8322
    @westlymeza8322 2 года назад +1

    Thank you so much, it was useful to me :)

  • @emiliowildberger7151
    @emiliowildberger7151 2 года назад

    It does not work for me ...... why do they make it so difficult, a miserable email I can not send

    • @DaimtoAps
      @DaimtoAps  2 года назад

      I'm sorry to hear that it not helping. put up a question on stack overflow with your code I will have a look. or email me the address can be found in the about section on the channel

  • @tombaio
    @tombaio 8 месяцев назад

    Thanks, please make one for Chrome client

    • @DaimtoAps
      @DaimtoAps  5 месяцев назад +1

      Sorry im not a chrome developer.

  • @viktordesovski5313
    @viktordesovski5313 2 года назад

    Yes, it worked, thank you so much.

  • @kymange
    @kymange Год назад

    this was soooo easy to fix! thanks

  • @padleo
    @padleo Год назад

    Life Saver again !! Thanks ! ;)

  • @mujiburrahman6359
    @mujiburrahman6359 3 года назад +1

    I love your video... You are beauty

    • @DaimtoAps
      @DaimtoAps  3 года назад

      I hope it helped 😉

  • @sarchstar
    @sarchstar Год назад

    Easy fix, thank you!

  • @deepakrajput8693
    @deepakrajput8693 9 месяцев назад

    how to add local ip address in this url????

    • @DaimtoAps
      @DaimtoAps  9 месяцев назад +1

      Use localhost

  • @spaghetto181
    @spaghetto181 5 месяцев назад

    thank you so much.

  • @DaimtoAps
    @DaimtoAps  3 года назад

    If you are seeing redirect_uri_mismatch in your JavaScript app check out my other video Simple solution for redirect_uri_mismatch error with JavaScript ruclips.net/video/V0-4LnHwFho/видео.html The full code for this example can found here ruclips.net/video/aqjglbdFGPk/видео.html

  • @saimonkhan1451
    @saimonkhan1451 3 года назад

    love you bro...... this working

  • @_FFFFFF_
    @_FFFFFF_ Год назад

    I don't get to see the uri, only the fact that i "got it wrong".

    • @DaimtoAps
      @DaimtoAps  Год назад

      there should be a link you can click on the message to display it. They have changed the error since this video was made.

  • @danielandresmartinezrobali4713
    @danielandresmartinezrobali4713 2 года назад

    You save my life, thnx a lot

  • @gauravshrivastava5366
    @gauravshrivastava5366 2 года назад

    It works. Thanks!!!!!

  • @artemkostochkin4491
    @artemkostochkin4491 2 года назад +1

    It's works

    • @DaimtoAps
      @DaimtoAps  2 года назад

      glad to hear that 🤗

  • @tigidou3344
    @tigidou3344 Год назад

    Not resolve problem. Exactly the same url. Problem stay.

    • @tigidou3344
      @tigidou3344 Год назад

      Google noted that the change take 5 minutes to some hours... 2 days passed... always get the same error.

    • @DaimtoAps
      @DaimtoAps  Год назад

      Sounds like you havent added the right uri. Is your port number corect?

  • @RAJANIKANTPAWAR-lv5gx
    @RAJANIKANTPAWAR-lv5gx 10 месяцев назад

    Thank You

  • @hassanahmed4075
    @hassanahmed4075 3 года назад

    the port keeps on changing for localhost :/

    • @DaimtoAps
      @DaimtoAps  3 года назад

      Your ide is normally the cause of random porrs. Check the settings for your ide.

    • @hassanahmed4075
      @hassanahmed4075 3 года назад

      @@DaimtoAps actually it was a line in the code, where i can manually statically set the port, thankyou for the reply though!

    • @羽山秋人-y3z
      @羽山秋人-y3z 3 года назад +1

      @@hassanahmed4075 Hi there, I encountered the same issue, just wondering which line you set to fix it?
      appreciate your help.

  • @tahakhan2141
    @tahakhan2141 2 года назад +1

    legende :)

  • @thunderp1nk
    @thunderp1nk 2 года назад

    great job! thank you

  • @MohamedSamy-xu3pi
    @MohamedSamy-xu3pi Год назад

    Thank You !!

  • @ChristoGroenewald
    @ChristoGroenewald 3 года назад

    it worked!

  • @makeiteazzy5909
    @makeiteazzy5909 3 года назад +1

    Thanks & appreciate

    • @DaimtoAps
      @DaimtoAps  3 года назад

      Your welcome I'm happy I could help.

  • @gio73808
    @gio73808 2 года назад

    Thank you a bunch 💛

  • @arunanup1440
    @arunanup1440 Год назад

    thanks a lot

  • @liverwanda7187
    @liverwanda7187 2 года назад

    Wow... Thanks

  • @stewartmarshall2912
    @stewartmarshall2912 3 года назад

    Thank you tons!

  • @JulienSilmaril
    @JulienSilmaril 2 года назад

    thank you, miss

  • @orequal
    @orequal 2 года назад

    Thanks for the solution

  • @chelobotix
    @chelobotix 2 года назад

    come on, you are awesome!

  • @_aoManhHung
    @_aoManhHung 2 года назад +1

    tks

    • @DaimtoAps
      @DaimtoAps  2 года назад

      happy to be of service ❤️

  • @llllu5
    @llllu5 6 месяцев назад

    god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you god bless you

  • @MiMVikasKumar
    @MiMVikasKumar Год назад

    my problem is same not solve

    • @DaimtoAps
      @DaimtoAps  Год назад

      Double check the uri or email me i would be happy to help

  • @searchh-t-t-p-s-d-a-t-aoni8823

    👆👆👆👆👆👆 IT engineers ,they fix any software issues...

  • @website_developers
    @website_developers 3 года назад

    Impressive.

  • @sakshyanigam972
    @sakshyanigam972 2 года назад

    thanks ma'am

    • @DaimtoAps
      @DaimtoAps  2 года назад

      your very welcome kind sir 🙂

  • @pablov.viteri9345
    @pablov.viteri9345 Год назад

    I love you❤

  • @JuniorPiresJacir
    @JuniorPiresJacir 3 года назад

    obrigado

  • @windar2390
    @windar2390 Год назад

    localhost:5173/auth/callback/google
    did the job. thx!

  • @hunterallen3928
    @hunterallen3928 2 года назад

    Thanks so much

  • @greatestinn2856
    @greatestinn2856 3 года назад +1

    Thanks a lot

    • @DaimtoAps
      @DaimtoAps  3 года назад

      Happy I could help 😃