Re: [OAUTH-WG] One-time token login

Neil Madden <> Tue, 02 March 2021 20:05 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id CCC253A0E9B for <>; Tue, 2 Mar 2021 12:05:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Status: No, score=-2.098 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_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id z0KdJD8MSkxF for <>; Tue, 2 Mar 2021 12:05:44 -0800 (PST)
Received: from ( [IPv6:2a00:1450:4864:20::336]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 07F553A0E5D for <>; Tue, 2 Mar 2021 12:05:44 -0800 (PST)
Received: by with SMTP id n22so3278239wmc.2 for <>; Tue, 02 Mar 2021 12:05:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=from:mime-version:subject:date:message-id:references:cc:in-reply-to :to:content-transfer-encoding; bh=QlOJtzPYO2QFKrYJw75n+BclRljpBaS1ZqJdJbK0reY=; b=KYuIE5hvCt/RNiXNqdIHqpMPuu1Lxm7Wq2lOIR9Rz1mjwC9FX3R1dXJhaqpIoCCqBy RM3PGCt5QxS7Sfr6nCK8yxsiRK1uAXhnIVM/CayyDk26H086nWMp714ROQFIG9nUURWb 7Hp9YCxy8gGjpl+TPme3isO+qH54Nf/PT2V2Y=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to:content-transfer-encoding; bh=QlOJtzPYO2QFKrYJw75n+BclRljpBaS1ZqJdJbK0reY=; b=ZlsVmTp44A+k8KGBFhRnFJ/2TvCotJhFa5kY5zovZfap+r3e8abMXjPWMp3vEWjG1A Eg31GJP19HFoe6q/UJKHdhXzFinGtIpTK0YOZ+4eUzrYjtIGfbO2/+0W8uAAKZRiPFas 4HmSeO0b4OQxNUIXlWJD0aeIdblIiX2/JG8wJcYYyKWushD7h0Qghm3Uma1NvWyzQClm ce3nzOwoJI67dp5PHoyh75I4VxD/nfaRuGVa1WLc90nmpTG9LLDPbIfwHuS4n5rPZkPP +f7f3mA2k0SSfvdsn2g/ySE2jlo/0OCoUydH1kLMfaYmKQRKw8Ghs4nMPceh2f72VEJE wPeQ==
X-Gm-Message-State: AOAM530xmH+AaM8TK7GAkY3AH/oUEQ+BpSEiIOjLl7JNHqAB95ZJDaA/ 8za6AouNuX3cuDf3R3YB3RcLxixjaXMAGE31K3BjO8meQGX5o90GERiFH0VVJd2p8T7/wmVnGQ= =
X-Google-Smtp-Source: ABdhPJxgjunaPTQ87IcSMoB4g+pXbN6r3LY8fAN2CfsUolPevIP0fmEPOZrbWjQ0/5tMFulHqblFaQ==
X-Received: by 2002:a7b:cf16:: with SMTP id l22mr5508706wmg.26.1614715537223; Tue, 02 Mar 2021 12:05:37 -0800 (PST)
Received: from [] ( []) by with ESMTPSA id p17sm3204797wmd.42.2021. (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Mar 2021 12:05:36 -0800 (PST)
From: Neil Madden <>
Mime-Version: 1.0 (1.0)
Date: Tue, 02 Mar 2021 20:05:35 +0000
Message-Id: <>
References: <>
In-Reply-To: <>
To: Evert Pot <>
X-Mailer: iPhone Mail (18D52)
Content-Type: multipart/alternative; boundary="Apple-Mail-5418E326-C308-4515-BF3C-B4B683092964"
Content-Transfer-Encoding: 7bit
Archived-At: <>
Subject: Re: [OAUTH-WG] One-time token login
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: OAUTH WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 02 Mar 2021 20:05:47 -0000

One option is JWT Bearer grant with “jti” and replay prevention ( ) if your AS supports it. This is nice if some other component is generating the emails as it needs no coordination with the AS. 

— Neil

> On 2 Mar 2021, at 19:04, Evert Pot <> wrote:
> 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:
> 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.
> Are there any major pitfalls associated with this?
> Evert
> _______________________________________________
> OAuth mailing list

ForgeRock values your Privacy <>