Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

181
Visualizações
"redirect_uri_mismatch" when exchanging access token under "popup" mode

We build our web application and integrate with Google OAuth2 according to this doc Google Identity Services JavaScript SDK

We would like to use "popup" mode, but when trying to exchange access_token with authentication code, /token return error like "

{"error": "redirect_uri_mismatch","error_description": "Bad Request"}"

We have passed the redirect_url param when calling /token, and it is exactly the same one as configured on the credential page.

What's more weird is that when we switch to "redirect" mode, everything works fine. Same client_id, same client_secret, same grant_type, same redirect_uri.

I don't get it, it's like codes generated under redirect and popup mode are treated differently.

Any help? Thanks a lot!

about 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

As per doc you referenced, Google is not expecting a refirect_url in popup mode. Google will not send a redirect. Instead it will return auth code directly to your callback and the callback will have to send it to your server.

about 4 years ago · Santiago Trujillo Relatório

0

Set the redirectUri in the OAuth2 client to "postmessage" to indicate that you've already sent the message.

It's an undocumented feature.

Google OAuth redirect_uri_mismatch when exchanging one-time-code for refresh token

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda