Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Instagram seems to be dropping state parameter on the floor...
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
JT  
View profile  
 More options Jul 1 2012, 7:52 pm
From: JT <jt2...@gmail.com>
Date: Sun, 1 Jul 2012 16:52:48 -0700 (PDT)
Local: Sun, Jul 1 2012 7:52 pm
Subject: Instagram seems to be dropping state parameter on the floor...

I have fb working fine but instagram throws a protocol exception using the
exact same code.  Stepping through it, it appears that our state is not
being returned in the url.  The original outbound URL looked like this:

https://api.instagram.com/oauth/authorize?client_id=[client_id]&redirect_uri=https%3A%2F%2Flocalhost%2FAccount%2FLinkAccountCal lback%3Fservice%3Dinstagram&state=yagfvct1ke3pnyda0kcsjx2l&response_type=co de

and the eventual redirected response request came back like this

https://localhost/Account/LinkAccountCallback?service=instagram&code=...

So what it seems like is that I would need to be able to query the state
value (which appears to be asp.net session id) and roll that into my
callback uri prior to calling PrepareRequestUserAuthorization().  
Otherwise, it seems that instagram won't send back the params that
DotNetOpenAuth is internally adding outside of the redirect_uri context.

Any ideas?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Arnott  
View profile  
 More options Jul 1 2012, 7:55 pm
From: Andrew Arnott <andrewarn...@gmail.com>
Date: Sun, 1 Jul 2012 16:55:44 -0700
Local: Sun, Jul 1 2012 7:55 pm
Subject: Re: [dotnetopenauth] Instagram seems to be dropping state parameter on the floor...

I would suggest you start with contacting instagram telling them that their
implementation is buggy and they should fix it.  In my experience, folks
are usually pretty responsive to fixing their service when the spec is
clearly different.

--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death
your right to say it." - S. G. Tallentyre


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JT  
View profile  
 More options Jul 3 2012, 2:02 am
From: JT <jt2...@gmail.com>
Date: Mon, 2 Jul 2012 23:02:26 -0700 (PDT)
Local: Tues, Jul 3 2012 2:02 am
Subject: Re: [dotnetopenauth] Instagram seems to be dropping state parameter on the floor...

Hi Andrew,

Thanks for replying.  Unfortunately my post on the instagram developers
google group isn't even getting approved (no errors, just never showing
up).  Also, I see a similiar problem/question posted a year ago and it
never got a reply.  I'm guessing they have bigger fish to fry or
something.  To try to push forward I did a few things on my end.

First I tacked the state={HttpContext.Session.SessionID} string onto my
callbackUri param.  This got me past the first issue but right into the
next.  Your StripMessagePartsFromQueryString() call takes the state= part
back out of the callbackUrl value.  So then when we call back to get the
token and pass a different callback value the server gives 400.  

Now if I build the url by hand in the debugger and put my state= string
back into the callback value for this second call we actually get back a
successful response with an access token but then
DeserializeJsonAsFlatDictionary throws an exception citing "the maximum
read depth (2) has been exceeded because XML data being read has more
levels of nesting than is allowed by the quota".  Apparently the returned
JSON is upsetting.

"{\"access_token\":\"38478976.b0722de.2e3789c97bd14fb1b79a789f47d68e6c\",\" user\":{\"username\":\"myusername\",\"bio\":\"\",\"website\":\"\",\"profile _picture\":\"http:\\/\\/images.instagram.com\\/profiles\\/anonymousUser.jpg \",\"full_name\":\"My
Full Name\",\"id\":\"123456\"}}"

So I just can't catch a break on this one! :-)

If you have any ideas or if I can supply any more info please let me know.

Thanks
-JT


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Arnott  
View profile  
 More options Jul 3 2012, 9:43 am
From: Andrew Arnott <andrewarn...@gmail.com>
Date: Tue, 3 Jul 2012 06:43:53 -0700
Local: Tues, Jul 3 2012 9:43 am
Subject: Re: [dotnetopenauth] Instagram seems to be dropping state parameter on the floor...

Hi JT,

The fact that the service is sending back a richer-than-standard access
token response (with a JSON object that contains sub-objects) isn't
strictly against the spec, from what I can read from the spec.  So please file
an issue <https://github.com/dotnetopenauth/dotnetopenauth/issues> asking
for rich JSON objects in access token responses to be supported.

As for the state, that and combine it with the above issue, I recommend you
(gasp) try putting DotNetOpenAuth aside and doing the client flow manually
yourself.  OAuth 2 isn't *that* complicated for the client usually, and in
this case it sounds like it may be less friction for you.

What do you think?
--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death
your right to say it." - S. G. Tallentyre


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JT  
View profile  
 More options Jul 3 2012, 10:57 am
From: JT <jt2...@gmail.com>
Date: Tue, 3 Jul 2012 07:57:22 -0700 (PDT)
Local: Tues, Jul 3 2012 10:57 am
Subject: Re: [dotnetopenauth] Instagram seems to be dropping state parameter on the floor...

Sure, sounds reasonable.  I filed the issue just now.

Along the lines of the JSON responses...  with OAuth1/WebConsumer I get an
authResponse back that includes an ExtraData field.  However in
OAuth2/WebServerClient I don't see an analog.  So even if we weren't
hitting the parsing exception I'm not seeing a way that I'd be able to
access the contents of this JSON payload.   Is that correct?

-JT


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Arnott  
View profile   Translate to Translated (View Original)
 More options Jul 3 2012, 1:28 pm
From: Andrew Arnott <andrewarn...@gmail.com>
Date: Tue, 3 Jul 2012 10:28:09 -0700
Local: Tues, Jul 3 2012 1:28 pm
Subject: Re: [dotnetopenauth] Instagram seems to be dropping state parameter on the floor...

Probably correct.  This will have to get fixed with support for the rich
object within it.
--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death
your right to say it." - S. G. Tallentyre


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JT  
View profile  
 More options Jul 10 2012, 3:41 pm
From: JT <jt2...@gmail.com>
Date: Tue, 10 Jul 2012 12:41:42 -0700 (PDT)
Local: Tues, Jul 10 2012 3:41 pm
Subject: Re: [dotnetopenauth] Instagram seems to be dropping state parameter on the floor...

So the official response from Instagram was:

-----------------------
Hi all,

We do support GET params in the redirect_uri parameter (if that's not
working, please let us know). You'll have to modify your library to support
passing that state as part of the GET param if it currently does not.

--
Mike Krieger
Co-founder, Instagram
------------------------

I.e. "we're not adding support for the state param"...  so it would be nice
if DotNetOpenAuth were able to deal with the state var being part of the
redirect_uri field at some point.  Thoughts?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Arnott  
View profile  
 More options Jul 10 2012, 6:03 pm
From: Andrew Arnott <andrewarn...@gmail.com>
Date: Tue, 10 Jul 2012 15:03:19 -0700
Local: Tues, Jul 10 2012 6:03 pm
Subject: Re: [dotnetopenauth] Instagram seems to be dropping state parameter on the floor...

Was this reply on a public forum that I can contribute to?  I'd like to
drill in a bit more on this.

--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death
your right to say it." - S. G. Tallentyre


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Bradley  
View profile   Translate to Translated (View Original)
 More options Jul 10 2012, 8:51 pm
From: John Bradley <ve7...@ve7jtb.com>
Date: Tue, 10 Jul 2012 20:51:20 -0400
Local: Tues, Jul 10 2012 8:51 pm
Subject: Re: [dotnetopenauth] Instagram seems to be dropping state parameter on the floor...

They must support state to conform to OAuth 2.0.  

There are security reasons not to pass state in query parameters.
Google and many other providers won't allow it.

Variable query parameters are allowed but not required to be supported.
In OAuth.

John B.  

Sent from my iPad

On 2012-07-10, at 6:03 PM, Andrew Arnott <andrewarn...@gmail.com> wrote:

  smime.p7s
8K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JT  
View profile  
 More options Jul 11 2012, 12:08 pm
From: JT <jt2...@gmail.com>
Date: Wed, 11 Jul 2012 09:08:34 -0700 (PDT)
Local: Wed, Jul 11 2012 12:08 pm
Subject: Re: [dotnetopenauth] Instagram seems to be dropping state parameter on the floor...

Yes, it was on the instagram API developers google group... hopefully this
link will work:

https://groups.google.com/forum/?fromgroups#!topic/instagram-api-deve...

You may have to join the group first:

https://groups.google.com/forum/?fromgroups#!forum/instagram-api-deve...

Good luck and thanks for looking into this!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Arnott  
View profile  
 More options Jul 13 2012, 10:28 am
From: Andrew Arnott <andrewarn...@gmail.com>
Date: Fri, 13 Jul 2012 07:28:03 -0700
Local: Fri, Jul 13 2012 10:28 am
Subject: Re: [dotnetopenauth] Instagram seems to be dropping state parameter on the floor...

I've replied to the forum.  John, if you can add the security
considerations as to why a redirect_uri query parameter is insufficient,
I'd be interested, and it may help add weight to the forum post.
--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death
your right to say it." - S. G. Tallentyre


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JT  
View profile  
 More options Jul 15 2012, 5:42 pm
From: JT <jt2...@gmail.com>
Date: Sun, 15 Jul 2012 14:42:44 -0700 (PDT)
Local: Sun, Jul 15 2012 5:42 pm
Subject: Re: [dotnetopenauth] Instagram seems to be dropping state parameter on the floor...

Dang, they actually fixed it.  He replied to your post and now I'm seeing
the state param come back.  Now DNOA is puking on that XML depth bug that I
posted previously.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »