Urgent: mulitple Tender apps getting Mutlipass not being decrypted

nate's Avatar

nate

May 24, 2010 @ 05:47 PM

We just launched our integration with customerhub.net.. as I'm sure you've been getting the notifications :)

Anyway, everything seemed to be working properly, however we are starting to see the following errors:

"The MuliPass token was not able to be decrypted"

I am using the following gem: http://github.com/entp/multipass

And here is how I implemented the multipass in our user object:

  # initialize the multipass object
  def self.multipass(site_key, api_key)
    # for `yourapp.tenderapp.com`, `yourapp` is your SITE KEY
    @multipass ||= MultiPass.new(site_key, api_key)
  end

  # create a multipass for this user object
  def multipass(site_key, api_key, subdomain)
    m = self.class.multipass(site_key, api_key)
    m.encode(:email => email, :name => name, 
      :expires => 30.minutes.from_now, :unique_id => id, :alternate_id => email, 
      :trusted => true, :external_url => "https://#{subdomain}.customerhub.net/welcome")
  end

Not sure why they aren't being decoded properly.

Please help asap as I've got customers wanting to integrate.

Nathan

  1. Support Staff 1 Posted by Courtenay on May 24, 2010 @ 05:50 PM

    Courtenay's Avatar

    Is your server clock running slow?

    ============
    Courtenay
    (310) 294-4026
          ^{0,o}'

  2. 2 Posted by nate on May 24, 2010 @ 05:52 PM

    nate's Avatar

    not sure.. running on Engine Yard. Do you mean the time on the server?

  3. Support Staff 3 Posted by Courtenay on May 24, 2010 @ 06:07 PM

    Courtenay's Avatar

    Does it work in the debugger?

    ============
    Courtenay
    (310) 294-4026
          ^{0,o}'

  4. 4 Posted by nate on May 24, 2010 @ 06:09 PM

    nate's Avatar

    Nope. I'm getting the same error. Not sure why... it seemed to be working when we first launched last week. But now, I'm getting that error.

  5. 5 Posted by nate on May 24, 2010 @ 06:21 PM

    nate's Avatar

    But when I encode and decode manually using the gem it seems to work.

    example:

    sso_token = @user.multipass( site_key, api_key, subdomain)
    

    and then manually decode the SSO token:

    m = MultiPass.new(site_key, api_key)
    m.decode(sso_token)
    

    It seems to decode everything properly.

  6. Support Staff 6 Posted by Courtenay on May 24, 2010 @ 06:21 PM

    Courtenay's Avatar

    Can you paste me a token and the URL of your tender instance? I'll
    jump in and debug.

    ============
    Courtenay
    (310) 294-4026
          ^{0,o}'

  7. 7 Posted by nate on May 24, 2010 @ 06:29 PM

    nate's Avatar

    Sure:

    I created one for a test user using our support instance customerhub.tenderapp.com.

    SSO token that was generated for the test user:

    47EQnEUy_voADHx2Ke1Uj0j_-nVEaD42X7CpF48zH7PR02kx7QhUQuwJ6qaipHgrV1h_e_3AlQxW-Xk0CjVsePqYajh1RDAZGLmCra4PP_4p5unvr5G4D6cVQRsv6Xt_Dw3St6aWT8AI_v3_Ro-82i_7pLu3T7_d_39jlcxQE7G4I_79VtSVTim0OFWYw3zcobZVjYE5sulw2cqqkA00MQUkpGpKsrvuIzjYF8DCFxSQ36L_wf5HJUB2Uf-8juC-TSPh-7h504lzVkmQQl6M1wTgyUHhJ53aze1ptnuaz6o
    
  8. 8 Posted by nate on May 24, 2010 @ 06:33 PM

    nate's Avatar

    Hmm... now i just tried manually decoding this one.. and I get an error:

    MultiPass::DecryptError: The MultiPass token was not able to be decrypted.
        from /usr/local/lib/ruby/gems/1.8/gems/multipass-1.2.3/lib/multipass.rb:91:in `decode'
        from (irb):13
    

    Weird... it worked for the other user.

  9. 9 Posted by nate on May 24, 2010 @ 09:43 PM

    nate's Avatar

    Hi Courtenay.. any updates?

    Sorry, I know you're busy.. I've got clients breathing down my neck :)

    Nate

  10. 10 Posted by court3nay on May 25, 2010 @ 12:47 AM

    court3nay's Avatar

    Hey, sorry, on a cross-continental plane right now - but - do you have
    a SSO token that you can run both ways (encrypt and decrypt) and that
    works in the debugger?

  11. 11 Posted by nate on May 25, 2010 @ 05:02 PM

    nate's Avatar

    Oh ok.. sorry.

    Here is one that works:

    P7ef9iirmSZjBis7ZWtVIeoM5uIke3MnbfAGNOKPYzuXSkFI3x8rxFNHAMXOsMF43y-EONeyJ2KSOClbMWIrs0uSLUbjkq_AA8gNM4kFP-J-_5dKnmGqWiFtdezNtLaB32V_GT7WKGiYbrohtESQxJ__cUAfWSxpbI_u1EYBCVlVIko29k_0xAHwwImJCB3g9Q6_IWT1-wUvpiPr02o7uWx2d7xDtiQgUsr_NDZyt6B1dpRTfspkfZLUQlR3iojqAo13VypVR8ADTqjBMsU3jgmcFNodZEM1pirxNxPWj9Wodr-0_fSUaBuIqF1F0NPb
    
  12. Support Staff 12 Posted by Courtenay on May 25, 2010 @ 05:07 PM

    Courtenay's Avatar

    Yup, "Logged in as Nathan Leavitt from CustomerHub."

    Works fine - what's the problem? :)

  13. 13 Posted by nate on May 25, 2010 @ 05:12 PM

    nate's Avatar

    The problem is that some SSO tokens work and others that are generated aren't, like the one I posted yesterday.

    Nathan

  14. Support Staff 14 Posted by Courtenay on May 25, 2010 @ 05:19 PM

    Courtenay's Avatar

    Heh, not trying to be glib :) just attempting to reproduce the issue
    consistently!

  15. 15 Posted by nate on May 25, 2010 @ 05:23 PM

    nate's Avatar

    Oh..yeah, I didn't mean that as harsh as it may have come off... haha.

  16. Support Staff 16 Posted by Courtenay on May 25, 2010 @ 05:26 PM

    Courtenay's Avatar

    Ah, I see.. can you generate a few that can't, and dump me all the
    variables that went into it? I assume there's a character or sorting
    issue in there somewhere.

  17. 17 Posted by nate on May 25, 2010 @ 05:58 PM

    nate's Avatar

    Hey Courtenay... I'm going to do some more debugging from my end. Something seems strange and it's probably on my end or my customers. Let me do some more testing and just double check my customers settings for their Tender instances. I'll update you if I find anything new.

  18. Support Staff 18 Posted by Courtenay on May 25, 2010 @ 06:01 PM

    Courtenay's Avatar

    OK, no prob. :)

  19. Courtenay closed this discussion on May 25, 2010 @ 09:24 PM.

Discussions are closed to public comments.
If you need help with Tender please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac