Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows for multi user support #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

achadee
Copy link

@achadee achadee commented Oct 19, 2016

This extra option allows for you to configure a user token outside the YML file meaning your app can support multiple users

@@ -1,3 +1,3 @@
module EbayClient
VERSION = '0.2.0.981'
VERSION = '0.2.0.982'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the last number in the version reflects the ebay api version used - if so the version should be 0.2.1.981

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the version used for the gemspec, So I suggest you put the ebay version somewhere else so the ruby gem can be properly versioned with bundle update

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want me to change it to 0.2.1.981 for now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the slow feedback, but how would just setting the token allow for "multiple users"? Aren't appid, devid and certid equally part of a user? I reckon that having several instances of the client each with it's own set of settings in an individual configuration would be more sensible: (see engine.rb)

  configurations = EbayClient::Configuration.load File.load('<config file>')
  configuration = configurations[<environment>]

  EbayClient.api = EbayClient::Api.new configuration

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its been a while since I touched this gem, but my understanding of the Ebay API

AppId, devid, certid - should never change
user_id gets generated each time a user OAuth's through your app. So if you only want to have 1 user per app installation then yes this would be correct

However if your app needs to Auth multiple users through one service it can no longer be hard coded and needs to be generated on the fly

I currently use my forked gem on our production app, If you already provide this functionality ill be happy to move back to the original

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants