跳到正文
Dev.to Top Tech(dev.to)· AppFirstAid·· 4 天前品質評分42

網域搬家後 Google 登入出現「Error 400: redirect_uri_mismatch」怎麼修

Google sign-in "Error 400: redirect_uri_mismatch" after a domain move: find the exact address and fix it

重點導讀

網站換了網域後,按下「使用 Google 登入」可能會看到錯誤訊息,因為 Google 收到的回傳地址,和你預先填在設定裡的地址不完全一樣。先檢視登入請求實際使用的 redirect_uri,再到 Google Cloud 找出網站正在使用的 OAuth 使用者端,把這個地址逐字加到「Authorized redirect URIs」;網址的 http 或 https、大小寫和最後的斜線都要相同。如果錯誤提到 JavaScript origin,則要把錯誤中顯示的網站來源加到「Authorized JavaScript origins」,而且不能帶路徑或最後的斜線。改完後,等 Google 設定生效,再用無痕視窗到正式網域測試。

AI 伴隨問答

自備 Key 深度分析

針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:

信源出處dev.to

Google sign-in "Error 400: redirect_uri_mismatch" after a domain move: find the exact address and fix it

本文為 888news 精選之重點導讀。若需閱讀作者完整原文、技術細節與官方討論,請前往原始網站。

開啟原文
來源: Dev.to Top Tech (dev.to)
開啟原文

讀者討論

理性交流 · 即時討論