Rails app, gmail gem, xoauth: How to grant access to a specific application?

我们两清 提交于 2019-12-08 08:08:11

问题


I have a Rails application in which I would like to use the gmail gem to connect to a Google Apps account via XOauth and retrieve emails. I followed the gmail_xoauth instructions using the xoauth.py tool to generate tokens. This gives "anonymous" access to my Google Account. I am able connect via my Rails console just fine using these credentials.

I see that the gmail_xoauth gem has options for :consumer_key and :consumer_secret. I used "anonymous" for each of these. But, if my Rails application is going to be running at, say, http://someapp.example.com, how do I grant access to this application specifically and not use "anonymous"?

Thanks.

来源:https://stackoverflow.com/questions/6415421/rails-app-gmail-gem-xoauth-how-to-grant-access-to-a-specific-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!