Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Google API key got converted to lower case #12

Open
Ondolin opened this issue Dec 6, 2021 · 3 comments
Open

Google API key got converted to lower case #12

Ondolin opened this issue Dec 6, 2021 · 3 comments

Comments

@Ondolin
Copy link

Ondolin commented Dec 6, 2021

Hi,
I am trying to use the google sign in, but have some problems with my API key. I added one to the docker-compose, but for some reason the GET method uses lower case version of my API key. Therefore I get a 400 INVALID_ARGUMENT.
Is this issue known?
Can I fix this somehow?

@jbd7
Copy link

jbd7 commented Mar 1, 2023

Hi, I'm facing the same issue now, it gets lowercased with and without " marks. Have you figured out a workaround @Ondolin?

@Ondolin
Copy link
Author

Ondolin commented Mar 1, 2023

I've looked quite some time for another way to do this. But I don't think there is a workaround without looking into the code. And that has been to much effort for me.

@jbd7
Copy link

jbd7 commented Mar 2, 2023

Hey @Ondolin, thanks for your quick reply. I was trying something and I think I managed a workaround:

  • In the Google API console, create an API key (I was wrongly using the Client secret), enable People API and Drive API (and optionally, restrict access to IP/URL origins)
  • In the docker-compose.yml, enter the URL-encoded API key (e.g. a becomes %61). It's working because Stackedit uses it in a Request URL: https://people.googleapis.com/v1/people/me?personFields=names,photos&key=%47%4f%43...` and %6F being lowercased into %6f still get URL-decoded the same way.

I managed to sync a workspace and sync a file 2-ways between GDrive and Stackedit. Let me know if that works for you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants