Invalid redirect_uri contains reserved response param state

Hi there,

I’m trying to create a app (DWG Viewer for Drive) and publish to Google workspace marketplace. It work fine before published (and still fine in dev environment), but the published one doesn’t work! Failed in login to google step.

After user installed my app, he right click on a DWG file from drive, then he can “Open with” DWG Viewer. Then it opens url like drive.thingraph.site//?state={xxx}. For the first time, my page asks user to sign-in to google by a popup (redirect should be ok if it work!).

In my test environment, it popup correctly. But for the published online version it seems always redirects! Why? Then I get below error page:

It says there should not take “state” param. I use initTokenClient() to init. So I tried to remove the ‘state’ param before calling tokenClient.requestAccessToken(). But it sitll doesn’t work.

        tokenClient = google.accounts.oauth2.initTokenClient({
          client_id: CLIENT_ID,
          scope: SCOPES,
          callback: handleTokenResponse,
          ux_mode: 'popup' // 'popup' || 'redirect'
        })

Could anybody help?

My app is here BTW, DWG Viewer - Google Workspace Marketplace

Thanks,

1 Like