• Resolved Laura

    (@napbuf)


    Hi,
    I’m not sure this has already been asked (sorry if so… I couldn’t find it).
    Ok, so I think I setup everything properly:
    1. On google:
    – Create a project
    – Enabled Google Photos API
    – Created a Web application OAuth 2.0 Client IDs with the Authorized redirect URIs given
    – Setup the OAuth Consent Screen
    – Add my domain in the Domain verification

    2. On wordpress:
    – I disabled JetPack “Protect” and “Site Verification” options, just in case they were interfering.
    – I setup the plugin by setting Google Client Secret and went through the Authentication process, which went fine (i saved the token).

    After this, I went to create a new post, and clicked on the photonic button, clicked on Google Photos, select an option in the combobox (any: multiple photos, multiple albums or photos from an album), click on next, and get error 401. ALWAYS, I tried it so hard I am running out of ideas of what is causing it…

    Any help will be much appreciated…
    Thanks!

    • This topic was modified 4 years, 10 months ago by Laura.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    Please try the following steps:

    1. Create a post with the following shortcode:
      [gallery type='google' view='albums']
      I am assuming that your shortcode is gallery. If not, substitute gallery with whatever your shortcode is.
    2. Save the post and let me know what the URL is.

    I can take a look at the post once you have done so.

    Thread Starter Laura

    (@napbuf)

    Ok, this is the link (you need to put the password to see the post: TestPhotonicPlugin)

    https://lauraroundthe.world/test-photonic-plugin/

    This is what it says…

    Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.

    Plugin Author Sayontan Sinha

    (@sayontan)

    OK – this is one of those issues that is a plugin conflict, or a host setup issue (it is a little hard to say which one it is).

    Basically what is happening is, something at your end is removing the OAuth token from the request. In the past this has been seen to happen due to:

    1. Settings made by your web-host to prevent HTTPS calls from your domain
    2. Security plugins that strip out parameters on outgoing calls
    3. Caching plugins that remove URL parameters assuming that it will help with caching

    I would suggest checking with your web host first to see if they have any setting preventing HTTPS calls from being made by cURL. If not, then ask your host if they can see what outgoing calls are being made by your domain.

    If your host is not able to determine what is happening, then deactivate any sort of caching plugin and security plugin to see what is happening.

    Thread Starter Laura

    (@napbuf)

    Thanks for your suggestions. I’ve been playing with DNS and trying to grant https access, but none of the changes I tried fixed it… Then I went through some other replies you posted on other threads and tried to use a previous plugin version (2.34 instead of 2.43), and the previous version made the magic!
    I am using php 5.6, because I use a VM from google cloud and cannot upgrade to any posterior version (not at least with the configuration I am working with, I already tried it).

    Thank you again for your quick response ??

    Plugin Author Sayontan Sinha

    (@sayontan)

    Hmm… while I am happy that it worked for you, this is unprecedented. I didn’t make any changes between 2.34 and 2.43 for authentication, so the results are quite puzzling. Let me scrutinize the code further to see if there are any differences in between how the calls are happening. Let me also see if other users facing this issue are on PHP 5.6 and if downgrading to 2.34 fixes the issue for them.

    Thread Starter Laura

    (@napbuf)

    Ok, I will keep an eye on your responses. Thanks again

    Plugin Author Sayontan Sinha

    (@sayontan)

    Can you tell me how you installed 2.34? Did you go to your WP Dashboard → Plugins, then “Deactivate” Photonic, then “Delete”? Did you upload the older version after that?

    If you did so, I have a hunch that the “Delete” step probably flushed out a bad setting that was preventing this from working, and that now if you upgrade you will be fine.

    Thread Starter Laura

    (@napbuf)

    Yes I did that first… I was reading your reply on the other thread and it all makes sense now ?? I’m glad you found the error & the fixing.

    I confirm I just tried deactivating & deleting 2.34 and reinstalled 2.43, and everything woks with the latest version. Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Google Photos returns 401 after Authentication Successful’ is closed to new replies.