googleads / google-api-ads-ruby

Ad Manager SOAP API Client Libraries for Ruby
297 stars 229 forks source link

How to perform authentication client side? #173

Closed AdamT213 closed 4 years ago

AdamT213 commented 4 years ago

I want to use the google adwords api, but I am using Rails in Api-only mode. All the authentication methods I see seem to be assuming that there is a frontend Rails application. In my case, the frontend is a separate javascript application, making prompting for user permissions impossible with the methods described. Surely, this use case must be supported, so please kindly point me to where in the documentation I can find it. Thanks!

mcloonan commented 4 years ago

Since you're trying to authenticate in JavaScript, I don't know how much help I can be. However, a quick search of our OAuth docs led me to this guide on authenticating in a JavaScript web application: https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow

AdamT213 commented 4 years ago

@mcloonan the issue is that the adwords api is not in the list of supported apis for client side oauth. Seems very strange that google simply doesn't offer client side oauth to its api, since this is how most modern web apps operate...