Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JWT::InvalidIssuerError: Invalid issuer. Expected accounts.google.com, received https://accounts.google.com

Tags:

google-oauth

My website didn't have a problem in the past for login using Google oauth. Suddenly I am getting the above error.

like image 649
Nuri Avatar asked Dec 18 '22 05:12

Nuri


1 Answers

You don't need to downgrade your omniauth-google-oauth2 version. You can simply add verify_iss: false to your config.omniauth.

config.omniauth :google_oauth2, 
                Rails.application.secrets.oauth_google_id, 
                Rails.application.secrets.oauth_google_secret, 
                verify_iss: false

For more info, look at the verify_iss in https://github.com/zquestz/omniauth-google-oauth2#configuration

like image 197
kobaltz Avatar answered Dec 20 '22 17:12

kobaltz