fmhun / omniauth-mailchimp Goto Github PK
View Code? Open in Web Editor NEWMailChimp OAuth2 strategies for omniauth - REPOSITORY NOT MAINTAINED
Home Page: https://github.com/stevenkaras/omniauth-mailchimp
License: MIT License
MailChimp OAuth2 strategies for omniauth - REPOSITORY NOT MAINTAINED
Home Page: https://github.com/stevenkaras/omniauth-mailchimp
License: MIT License
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.
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?
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.
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}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.