Re: [OAUTH-WG] Quick survey: fragment vs. query
Luke Shepard <lshepard@facebook.com> Tue, 10 August 2010 17:33 UTC
Return-Path: <lshepard@facebook.com>
X-Original-To: oauth@core3.amsl.com
Delivered-To: oauth@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 0B3423A6AB3 for <oauth@core3.amsl.com>; Tue, 10 Aug 2010 10:33:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.04
X-Spam-Level:
X-Spam-Status: No, score=-101.04 tagged_above=-999 required=5 tests=[AWL=-1.054, BAYES_40=-0.185, HELO_MISMATCH_COM=0.553, HOST_MISMATCH_NET=0.311, HTML_MESSAGE=0.001, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_LOW=-1, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j2ilW6OJgEYy for <oauth@core3.amsl.com>; Tue, 10 Aug 2010 10:33:10 -0700 (PDT)
Received: from mx-out.facebook.com (outmail010.ash1.tfbnw.net [69.63.184.110]) by core3.amsl.com (Postfix) with ESMTP id 5644B3A6A98 for <oauth@ietf.org>; Tue, 10 Aug 2010 10:33:10 -0700 (PDT)
Received: from [10.18.255.136] ([10.18.255.136:20003] helo=mail.thefacebook.com) by mta006.ash1.facebook.com (envelope-from <lshepard@facebook.com>) (ecelerity 2.2.2.45 r(34067)) with ESMTP id 98/B6-14663-71B816C4; Tue, 10 Aug 2010 10:23:36 -0700
Received: from SC-MBX05.TheFacebook.com ([169.254.4.91]) by sc-hub04.TheFacebook.com ([fe80::8df5:7f90:d4a0:bb9%11]) with mapi; Tue, 10 Aug 2010 10:23:34 -0700
From: Luke Shepard <lshepard@facebook.com>
To: Oleg Gryb <oleg@gryb.info>
Thread-Topic: [OAUTH-WG] Quick survey: fragment vs. query
Thread-Index: AQHLI3bDAITbPXwcLEeVdwj3462ZcJLaEPmAgAEqKoCAAEdBgIAADaYA
Date: Tue, 10 Aug 2010 17:23:56 +0000
Message-ID: <F4265A73-F743-4E5F-BE16-5A7D31308B5A@facebook.com>
References: <C862F736.37253%eran@hueniverse.com> <AANLkTil_MQ1-JxNC-5S3bLDo6-WhG0GMBHVXQvvN-jdv@mail.gmail.com> <AANLkTi=A+ztAH8vbR-O8vYUxiE2cGjn-KHCpM05NE3fL@mail.gmail.com> <8F6F3A55-274C-4F38-84C8-C956D74504AE@lodderstedt.net> <837544.77407.qm@web37602.mail.mud.yahoo.com>
In-Reply-To: <837544.77407.qm@web37602.mail.mud.yahoo.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Content-Type: multipart/alternative; boundary="_000_F4265A73F7434E5FBE165A7D31308B5Afacebookcom_"
MIME-Version: 1.0
Cc: Naitik Shah <naitik@facebook.com>, OAuth WG <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Quick survey: fragment vs. query
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/oauth>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Aug 2010 17:33:12 -0000
Here are the possible URLs: http://static.facebook.com/connect/xd_proxy.php#code=10alkji&access_token=lzipa3p http://static.facebook.com/connect/xd_proxy.php?code=10alkji#access_token=lzipa3p Those who already use this flow in production (including Google, Facebook, Twitter, and others) typically work like this: - Parent frame initiates the transaction by spawning a popup or an iframe - Response comes back to a static relay file (like the xd_proxy.php above) - The relay interprets the URL, parses out arguments, and hands them to the parent frame - Parent frame then does what it wants. this could be making an API call via JSONP, handing info to the server via Ajax, or something else. Because the relay file is static, it isn't going to interpret the code regardless, even if it is sent in the query parameter. So since the client will handle it anyway, the fragment is better for two reasons: 1/ Less code for the JS to just pull it out of the fragment 2/ More efficient, as the relay file can be cached on the client. If you include a code then you degrade performance because it busts the cache every time. On Aug 10, 2010, at 9:35 AM, Oleg Gryb wrote: I was trying to understand that too (see "Is user agent profile secure" thread). The answers that I've got were: 1. It's already coded this way. 2. It's the most efficient way of doing that, because that relay.html page is static and can be cached by a browser. None of the answers above looks very convincing to me, but that's where UA is now. From: Torsten Lodderstedt <torsten@lodderstedt.net<mailto:torsten@lodderstedt.net>> Can someone pls. explain why code and token should both be returned in the fragment? regards, Torsten. _______________________________________________ OAuth mailing list OAuth@ietf.org<mailto:OAuth@ietf.org> https://www.ietf.org/mailman/listinfo/oauth
- [OAUTH-WG] Quick survey: fragment vs. query Eran Hammer-Lahav
- Re: [OAUTH-WG] Quick survey: fragment vs. query Brian Eaton
- Re: [OAUTH-WG] Quick survey: fragment vs. query David Recordon
- Re: [OAUTH-WG] Quick survey: fragment vs. query David Recordon
- Re: [OAUTH-WG] Quick survey: fragment vs. query Luke Shepard
- Re: [OAUTH-WG] Quick survey: fragment vs. query Naitik Shah
- Re: [OAUTH-WG] Quick survey: fragment vs. query Torsten Lodderstedt
- Re: [OAUTH-WG] Quick survey: fragment vs. query Oleg Gryb
- Re: [OAUTH-WG] Quick survey: fragment vs. query Luke Shepard
- Re: [OAUTH-WG] Quick survey: fragment vs. query Torsten Lodderstedt
- Re: [OAUTH-WG] Quick survey: fragment vs. query Torsten Lodderstedt
- Re: [OAUTH-WG] Quick survey: fragment vs. query Torsten Lodderstedt
- Re: [OAUTH-WG] Quick survey: fragment vs. query Eran Hammer-Lahav
- Re: [OAUTH-WG] Quick survey: fragment vs. query Oleg Gryb
- Re: [OAUTH-WG] Quick survey: fragment vs. query David Recordon
- Re: [OAUTH-WG] Quick survey: fragment vs. query Gryb, Oleg
- Re: [OAUTH-WG] Quick survey: fragment vs. query Brian Eaton
- Re: [OAUTH-WG] Quick survey: fragment vs. query Oleg Gryb
- Re: [OAUTH-WG] Quick survey: fragment vs. query Brian Eaton
- Re: [OAUTH-WG] Quick survey: fragment vs. query Naitik Shah
- Re: [OAUTH-WG] Quick survey: fragment vs. query Torsten Lodderstedt
- Re: [OAUTH-WG] Quick survey: fragment vs. query Brian Eaton
- Re: [OAUTH-WG] Quick survey: fragment vs. query Torsten Lodderstedt
- Re: [OAUTH-WG] Quick survey: fragment vs. query Brian Eaton
- Re: [OAUTH-WG] Quick survey: fragment vs. query Torsten Lodderstedt
- Re: [OAUTH-WG] Quick survey: fragment vs. query Eran Hammer-Lahav
- Re: [OAUTH-WG] Quick survey: fragment vs. query Torsten Lodderstedt
- Re: [OAUTH-WG] Quick survey: fragment vs. query Brian Eaton
- Re: [OAUTH-WG] Quick survey: fragment vs. query Torsten Lodderstedt
- Re: [OAUTH-WG] Quick survey: fragment vs. query Brian Eaton
- Re: [OAUTH-WG] Quick survey: fragment vs. query Torsten Lodderstedt
- Re: [OAUTH-WG] Quick survey: fragment vs. query Zeltsan, Zachary (Zachary)
- Re: [OAUTH-WG] Quick survey: fragment vs. query Eran Hammer-Lahav