From a5f1eeae044112f0676898e3c1c73bbab0cd28d3 Mon Sep 17 00:00:00 2001 From: Stefano Travelli Date: Thu, 12 Feb 2015 10:27:42 +0100 Subject: [PATCH] Fix OAuth2 login when no scope is defined --- lib/swagger-oauth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/swagger-oauth.js b/lib/swagger-oauth.js index bcbc2745..4d2e2080 100644 --- a/lib/swagger-oauth.js +++ b/lib/swagger-oauth.js @@ -14,8 +14,8 @@ function handleLogin() { var defs = auths; for(key in defs) { var auth = defs[key]; + oauth2KeyName = key; if(auth.type === 'oauth2' && auth.scopes) { - oauth2KeyName = key; var scope; if(Array.isArray(auth.scopes)) { // 1.2 support