Code Monkey home page Code Monkey logo

Comments (6)

fmhun avatar fmhun commented on June 27, 2024

Sorry for that, i'll have a look as soon as possible.

Le 11 juin 2012 à 03:41, Brian Getting a écrit :

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.


Reply to this email directly or view it on GitHub:
#3

from omniauth-mailchimp.

bgetting avatar bgetting commented on June 27, 2024

That's awesome, I appreciate it. I'm hoping it's just something dumb that I am doing… :)

On Jun 11, 2012, at 12:35 AM, florian mhun wrote:

Sorry for that, i'll have a look as soon as possible.

from omniauth-mailchimp.

fmhun avatar fmhun commented on June 27, 2024

You are right there is a problem. I ran the example app with sinatra and get the undefined method exception too. I'll debug that, if you find something don't hesitate to keep me informed ;) Thank you very much for your mail Brian.

Le 11 juin 2012 à 18:44, Brian Getting a écrit :

That's awesome, I appreciate it. I'm hoping it's just something dumb that I am doing… :)

On Jun 11, 2012, at 12:35 AM, florian mhun wrote:

Sorry for that, i'll have a look as soon as possible.


Reply to this email directly or view it on GitHub:
#3 (comment)

from omniauth-mailchimp.

fmhun avatar fmhun commented on June 27, 2024

The json response returned by the MailChimp API not return user_hash key anymore, I fixed that. Check the commit to view the change, it works now.
338b582

Le 11 juin 2012 à 18:44, Brian Getting a écrit :

That's awesome, I appreciate it. I'm hoping it's just something dumb that I am doing… :)

On Jun 11, 2012, at 12:35 AM, florian mhun wrote:

Sorry for that, i'll have a look as soon as possible.


Reply to this email directly or view it on GitHub:
#3 (comment)

from omniauth-mailchimp.

bgetting avatar bgetting commented on June 27, 2024

Are you seeing the credentials (specifically the token) being returned now?

On Jun 11, 2012, at 2:51 PM, florian mhun wrote:

The json response returned by the MailChimp API not return user_hash key anymore, I fixed that. Check the commit to view the change, it works now.
338b582

from omniauth-mailchimp.

fmhun avatar fmhun commented on June 27, 2024

Yes I do but a part of the token is located in metadata and you need to build it yourself. If you wan't to perform authenticated api calls on Mailchimp you need two things :

+ The oauth token : token = request.env['omniauth.auth']['credentials']['token']
+ The datacenter string : dc = request.env['omniauth.auth']['extra']['metadata']['dc']

Then, your real access token that you put to the authenticated api calls is token-dc as specified in the developer documentation http://apidocs.mailchimp.com/oauth2/#implementation-details

Let me know if i answer your question, my english may be hard to understand sometimes !

Le 12 juin 2012 à 00:12, Brian Getting a écrit :

Are you seeing the credentials (specifically the token) being returned now?

On Jun 11, 2012, at 2:51 PM, florian mhun wrote:

The json response returned by the MailChimp API not return user_hash key anymore, I fixed that. Check the commit to view the change, it works now.
338b582


Reply to this email directly or view it on GitHub:
#3 (comment)

from omniauth-mailchimp.

Related Issues (5)

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.