From 13ae50dd88ba5091c438fd174cd7dca28452ee97 Mon Sep 17 00:00:00 2001 From: longze chen Date: Tue, 23 Jul 2019 10:06:27 -0400 Subject: [PATCH] oauth profile now correctly recognizes deactivated token --- views.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views.go b/views.go index d22bea4..944e7dd 100644 --- a/views.go +++ b/views.go @@ -180,7 +180,7 @@ func OAuth(c echo.Context) error { ON django_content_type.id = osf_guid.content_type_id AND object_id = osf_osfuser.id JOIN osf_apioauth2personaltoken ON osf_osfuser.id = osf_apioauth2personaltoken.owner_id - WHERE osf_apioauth2personaltoken.token_id = $1 + WHERE osf_apioauth2personaltoken.token_id = $1 AND osf_apioauth2personaltoken.is_active ` err := DatabaseConnection.QueryRow(queryString, tokenId).Scan(&result.Id, &result.Username, &result.GivenName, &result.FamilyName) if err != nil {