moneylog icon indicating copy to clipboard operation
moneylog copied to clipboard

Google Drive: usar gapi.auth2

Open aureliojargas opened this issue 7 years ago • 0 comments

Hoje uso o gapi.auth, que é uma versão antiga e obsoleta.

Alguns métodos são diferentes, e não tem mais o getToken() que eu uso atualmente pra poder fazer as chamadas xhr. Aqui tem instruções de como obter o token.

Aí talvez seria o caso de usar o cliente JavaScript oficial do Google pra autenticar e acessar as APIs, em vez de fazer os xhr na mão.

  • https://developers.google.com/identity/protocols/OAuth2
  • https://developers.google.com/api-client-library/javascript/features/authentication
  • https://developers.google.com/identity/protocols/OAuth2UserAgent
  • https://developers.google.com/api-client-library/javascript/samples/samples#authorizing-and-making-authorized-requests
  • https://gist.github.com/Daniel15/5994054

aureliojargas avatar Feb 07 '18 17:02 aureliojargas