Code Monkey home page Code Monkey logo

omniauth-mailchimp's People

Contributors

colinyoung avatar dominicsayers avatar fmhun avatar lucasallan avatar m0dd3r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

omniauth-mailchimp's Issues

NoMethodError when account type is Viewer

When attempting to authenticate to an alternate account using multi-account support, if the account type is set to Viewer, a NoMethodError is thrown because raw_info returns an error hash.

The error:

NoMethodError - undefined method `[]' for nil:NilClass:
  omniauth-mailchimp (1.0.3) lib/omniauth/strategies/mailchimp.rb:22:in `block in <class:Mailchimp>'
  omniauth (1.2.1) lib/omniauth/strategy.rb:105:in `block in compile_stack'
  omniauth (1.2.1) lib/omniauth/strategy.rb:104:in `compile_stack'
  (eval):7:in `info_stack'
  omniauth (1.2.1) lib/omniauth/strategy.rb:321:in `info'
  omniauth (1.2.1) lib/omniauth/strategy.rb:334:in `auth_hash'
  omniauth (1.2.1) lib/omniauth/strategy.rb:361:in `callback_phase'
  omniauth-oauth2 (1.1.2) lib/omniauth/strategies/oauth2.rb:77:in `callback_phase'
  omniauth (1.2.1) lib/omniauth/strategy.rb:227:in `callback_call'
  omniauth (1.2.1) lib/omniauth/strategy.rb:184:in `call!'
  omniauth (1.2.1) lib/omniauth/strategy.rb:164:in `call'
  omniauth (1.2.1) lib/omniauth/builder.rb:59:in `call'

The value of raw_info when called at line 22 of the strategy:

{"error"=>"Only API Keys belonging to users with \"manager\", \"admin\", or \"owner\" roles may access this API.", "code"=>109}

rubygem outdated

It would be great if you could update the gem and push a new version to rubygems so it would include the fixes in c73c07f as I think that is a common problem people run into. Thanks!

uid is not correct

floomoon,

The uid that you're setting for omniauth is the same for all mailchimp logins because you're using the client id sent from the app during oauth instead of the new user. MailChimp doesn't include a unique id in their initial response (http://apidocs.mailchimp.com/oauth2/). We'll need to do another request to get it.

NoMethodError: undefined method `[]' for nil:NilClass

I am getting this error intermittently while consuming the mailchimp strategy of omniauth.

/gems/omniauth-mailchimp-1.0.3/lib/omniauth/strategies/mailchimp.rb:22 in "block in <class:Mailchimp>"
/gems/omniauth-1.1.1/lib/omniauth/strategy.rb:102 in "instance_eval"
/gems/omniauth-1.1.1/lib/omniauth/strategy.rb:102 in "block in compile_stack"
/gems/omniauth-1.1.1/lib/omniauth/strategy.rb:101 in "each"
/gems/omniauth-1.1.1/lib/omniauth/strategy.rb:101 in "inject"
/gems/omniauth-1.1.1/lib/omniauth/strategy.rb:101 in "compile_stack"

I am not sure what the issue is. Has anyone seen this before?

Credentials not being returned from Mailchimp

When I follow the example for this strategy, there are no credentials returned in the omniauth.auth array:

auth = request.env["omniauth.auth"]

auth['credentials']['token']
#=> NoMethodError (undefined method `[]' for nil:NilClass)

auth['credentials']
#=> nil

auth['extra']['user_hash']['dc']
#=> NoMethodError (undefined method `[]' for nil:NilClass)

Any ideas? It does spit back all of the user data, which gives me the impression that it is getting a token back since it would need that to get at the user data, right?

Anyway, love that someone built a strategy for Mailchimp, and any help that you can provide in getting this working would be great. I've always connected directly using the Oauth2 gem, but I'm hoping that this will be easier.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.