remotestorage/remotestorage.js

GoogleDrive `redirect_uri=http://localhost:port/` should be `redirect_uri=http://localhost:port`

NikitaIT opened this issue · 2 comments

  1. Open console https://console.developers.google.com/apis/credentials/oauthclient/${your_client_id}?project=${your_project_number}
  2. Set http://localhost:port as allowed to redirect and scripts. (URL ends with "/" - not valid)
  3. Go to http://localhost:port.
  4. Select GoogleDrive in Widget.
  5. App sends request like: https://accounts.google.com/o/oauth2/auth?redirect_uri=http://localhost:port/&scope=https://www.googleapis.com/auth/drive&client_id=...&response_type=token
  6. Oops.
Error:
The redirect URI in the request, http://localhost:port/, does not match the ones authorized for the OAuth client.

P.s. If i send request manualy without "/" it works fine.

env:
"remotestorage-widget": "^1.5.2",
"remotestoragejs": "^2.0.0-alpha.5",

FYI: Just published 2.0.0-alpha.6 including the fix for this (and with a much smaller library file size).

@raucao @galfert oh, i try it 2 days ago again, and i can add "/" in Authorized redirect URIs (although earlier I could not), and it works. May be its my fault. Or it fixed by google, i dont know. I suspect this might be a breaking change for someone. The situation seems very strange.
image