• Resolved luuklag

    (@luuklag)


    Every few days my authentication token expires. Which results in images not being loaded on my site. I followed the manual, and it worked fine in the beginning. Now as I add more and more galleries the succesion of token expiries increases. Every few days I have to authenticate again, loging in to google, give permission, get the token and save it. Only to repeat a few days later.

    I am now at a point that I have to check my site regularly to see if the plug-in is still working, which is frustrating. Anyone else had these problems and knows a fix?

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter luuklag

    (@luuklag)

    Hey Sayontan,

    After publishing my app the last time it went okay for a while, until today when the error resurfaced.

    Google Photos Refresh Token invalid. Please authenticate from Photonic → Authentication.
    Error encountered during authentication:

    {
      "error": "invalid_grant",
      "error_description": "Token has been expired or revoked."
    }

    See here for documentation.

    Plugin Author Sayontan Sinha

    (@sayontan)

    Sorry, but I am not sure if I can do anything to help here. As I wrote in a prior post, as per Google’s own documentation a refresh token never expires unless you have explicitly revoked access to the application. As you determined earlier, the publishing of your app was another prerequisite for this (not documented by Google, though). App publishing as such was not a step in the app setup earlier – it was introduced a few months back.

    Note that from Photonic’s point of view the only change I made to the original authentication code was a year back, when I started supporting desktop client IDs in addition to web application ids. Apart from that, the concept of refresh tokens and access tokens has been unchanged there has been no change to the code handling Google Photos authentication for almost a year. Basically, there is nothing in Photonic that has changed recently to trigger this behaviour.

    The only suggestion that I can make is to try and use a desktop client ID instead of a web application id. From the documentation this corresponds to Step 7a (not step 7b) in the Creating a Client ID section. A desktop client will not require you to use the workaround for authentication (but again, there are bugs in Google that cause some users to use the workaround).

    I have the same issue on https://erinsart.ca. Click on “Watercolours” or “Acrylics”. Caching is disabled for the entire site and I have published and reauthenticated.

    The error reappears after a few days.

    Plugin Author Sayontan Sinha

    (@sayontan)

    @kevinwalker99,
    Your error is different from the OP’s error – for the OP it says that the token has expired, but for you it says that you have a bad request. A “bad request” error could be due to a variety of reasons. It could be because of a different plugin adding something else to your Google query string, which Google fails to recognize. It could also be caused to to some security plugins.

    While the message may be different then the OP, the issue is the same. After a few days I have to reauthenticate. If it was another plugin I would think it would be random or happen right away. My issue occurs like clockwork after a few days every time. It has done this at least 10 times now. Thx for reviewing.

    Plugin Author Sayontan Sinha

    (@sayontan)

    @kevinwalker99,
    In that case, my answer doesn’t change from what I told the OP in my last post on this thread – I don’t know what else I can do to help.

    The only guarantee that I can give is that this isn’t happening due to Photonic – authentication functionality has not changed since a really long time (more than a year, and the last change then was that I added functionality to handle desktop clients). I see that you have another Google Photos / Picasa plugin active – I don’t know if that is causing some sort of a conflict.

    Issues caused by other plugins might not be random – there are plugins that do periodic sweeps of stored settings.

    You can try switching to a JS loading mode (Photonic → Settings → Generic Options → Advanced → Loading Mode) – that will tell me what string is being sent to Google, but it will not help me understand if something is changing your token.

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Keep needing to verify my api token’ is closed to new replies.