From nobody Tue Mar  2 11:04:41 2021
Return-Path: <me@evertpot.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1])
 by ietfa.amsl.com (Postfix) with ESMTP id E1CF23A0D5D
 for <oauth@ietfa.amsl.com>; Tue,  2 Mar 2021 11:04:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.119
X-Spam-Level: 
X-Spam-Status: No, score=-2.119 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001,
 RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001,
 URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key)
 header.d=evertpot.com header.b=KZ+ImMAU;
 dkim=pass (2048-bit key)
 header.d=messagingengine.com header.b=pZKQUo6K
Received: from mail.ietf.org ([4.31.198.44])
 by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id gq07yHIEfqM7 for <oauth@ietfa.amsl.com>;
 Tue,  2 Mar 2021 11:04:38 -0800 (PST)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com
 [66.111.4.25])
 (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by ietfa.amsl.com (Postfix) with ESMTPS id 73D573A0D5A
 for <oauth@ietf.org>; Tue,  2 Mar 2021 11:04:38 -0800 (PST)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id ADC3B5C005E
 for <oauth@ietf.org>; Tue,  2 Mar 2021 14:04:37 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Tue, 02 Mar 2021 14:04:37 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=evertpot.com; h=
 to:from:subject:message-id:date:mime-version:content-type; s=
 mesmtp; bh=rAg8NVBrWFgDSIvSrNe9iHP7hT3KXX+WSrywR/epvzc=; b=KZ+Im
 MAUsxFDkt6V9ApXXAz9rniPngGx1et04ZTvwlobUFlXJxoykHkc3Z+WWj4icc0Ke
 xcPbpN0PLOUGB/A2LisC4+evjIP4Z3hI5fmOtJgaeBE6nSLLiQ3o8S1Rs+Ebnm42
 lqrZDFjEREKPsx3IypBgIUcgLf7y1bTU9zJM+I=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm2; bh=rAg8NVBrWFgDSIvSrNe9iHP7hT3KX
 X+WSrywR/epvzc=; b=pZKQUo6KhQ56x/JMq91BbXN+NVUWClUoA+VkHrAP9qZ9K
 VcZJEsCzw7VrybprbEyfcWgdhIRrIvOKbr+k/XZYk3iQh7aHmyZ623ZweMRBIAQc
 vF05kuj4+OoswyqOnh2AHZFfGY5uoMsfT6+otiqFEB4Vf5C+kVxicuqlGn79OTL1
 RBrwQzzPs3NDK3B1N2GLIKkrE3UjjkU4FJRr0OA6mFVjZyrgcUMAuVSEZIr7vHJC
 yzf8SaSe14vAl5zYNRc6VPkF5t/79xMzVp96WtY+VsxeI8NeVyz4RTAx372RP+z8
 h/X65XVn+z0tVbjYminuDAA/XWVAuEHpRv6EqzxFA==
X-ME-Sender: <xms:RYw-YK0V7saR8ikBYNkhsX6zkA8kmL7eXcLOTC5FAC5yoGLz3ldOsw>
 <xme:RYw-YEsELxCrbfDEWCxYqhkHHkIbXT9IBeRysigLduH1Jag0YfHChhz_tXA4aa9jg
 ScapYgbhWZgG86F>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddttddgudduhecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhepvffhuffkffgfgggtsegrtderre
 dtfeejnecuhfhrohhmpefgvhgvrhhtucfrohhtuceomhgvsegvvhgvrhhtphhothdrtgho
 mheqnecuggftrfgrthhtvghrnhepueejieehveefleefjedtgefhleefteeiieejtdeivd
 dugfeiieeuhfdtudelvefhnecukfhppeelledrvdeftddrvdehfedrheejnecuvehluhhs
 thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgvsegvvhgvrhhtph
 hothdrtghomh
X-ME-Proxy: <xmx:RYw-YAgxba_40PvRLBcnRwj4n5eIjPqTS1Uzl3Qyx4tvmW6d4FLizg>
 <xmx:RYw-YF_Od4IhItC7kznPjnc8bAZlAXn8elQefrhkdHR_z6Qebq85OQ>
 <xmx:RYw-YDtW6UaXo1lJ3dspNTTsLkXyEVP8g2WqrXHjoLwhjOtiJBZkug>
 <xmx:RYw-YF_j1fHKuOpCM57UJezDCO9bNXfEJPWzwHLty3f4hakYHIKI_A>
Received: from [192.168.0.112]
 (cpe9050ca212883-cm9050ca212880.cpe.net.cable.rogers.com [99.230.253.57])
 by mail.messagingengine.com (Postfix) with ESMTPA id 67DDE24005A
 for <oauth@ietf.org>; Tue,  2 Mar 2021 14:04:37 -0500 (EST)
To: "oauth@ietf.org" <oauth@ietf.org>
From: Evert Pot <me@evertpot.com>
Message-ID: <6105c6f6-d291-b80e-4596-9ff4f10b3b55@evertpot.com>
Date: Tue, 2 Mar 2021 14:04:36 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.7.1
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------F9E88E0D38AE9AC31DC31325"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/0_oNB3OSzQ_L2uK5qCfU0kCTcK8>
Subject: [OAUTH-WG] One-time token login
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/oauth>,
 <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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, 02 Mar 2021 19:04:40 -0000

This is a multi-part message in MIME format.
--------------F9E88E0D38AE9AC31DC31325
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

Dear list,

We have a requirement to let users log in to an application via a code 
sent by email.
This code needs to be exchanged for an access/refresh token pair, and 
should only work once.

The access/refresh token scope would give limited access to the 
application. Since we already use the authorization_code flow for other 
(more sensitive) parts of the application, I would like to re-use the 
OAuth2 framework for parts of this.

It doesn't sit right with me to overload the 'code' in 
authorization_code, so I was considering introducing a new custom 
grant_type for our application, specific for this purpose.
It seems that grant_type in the 'token' endpoint would support extension 
in this manner, by using a uri such as https://vendor.example/email-token

I'm comfortable implementing this, but curious:

 1. Is there already some prior art that I'm not aware of? I'd rather
    not do a custom grant_type if there's something standard I could do.
 2. Are there any major pitfalls associated with this?

Evert


--------------F9E88E0D38AE9AC31DC31325
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Dear list,</p>
    <p>We have a requirement to let users log in to an application via a
      code sent by email.<br>
      This code needs to be exchanged for an access/refresh token pair,
      and should only work once.<br>
      <br>
      The access/refresh token scope would give limited access to the
      application. Since we already use the authorization_code flow for
      other (more sensitive) parts of the application, I would like to
      re-use the OAuth2 framework for parts of this.<br>
      <br>
      It doesn't sit right with me to overload the 'code' in
      authorization_code, so I was considering introducing a new custom
      grant_type for our application, specific for this purpose.<br>
      It seems that grant_type in the 'token' endpoint would support
      extension in this manner, by using a uri such as
      <a class="moz-txt-link-freetext" href="https://vendor.example/email-token">https://vendor.example/email-token</a></p>
    <p>I'm comfortable implementing this, but curious:</p>
    <ol>
      <li>Is there already some prior art that I'm not aware of? I'd
        rather not do a custom grant_type if there's something standard
        I could do.</li>
      <li>Are there any major pitfalls associated with this?</li>
    </ol>
    <p>Evert<br>
    </p>
  </body>
</html>

--------------F9E88E0D38AE9AC31DC31325--

