How to get the Google OpenID Identity URL in Ruby
I'm trying to move my web application to the Google Chrome store, and I want to charge for premium features. The problem is, to use the Chrome Web Store License API I need their Google OpenID identifier. I've read other similar questions, but none with code examples.
I found this example, but it seems to be for a different purpose.
So my question is, how do I use the Federated Login in a Sinatra / Rack environment to get that one param开发者_开发技巧eter?
Thank you.
You need to authenticate users with OpenID. The link has an example that shows how to use Rack::OpenID
.
With Google, instead of requesting the openid_identifier from the user you would need to hardcode https://www.google.com/accounts/o8/id
as identifier (instead of params["opened_identifier"]
) then run normal OpenID.
精彩评论