From 803aa84d97c02fcbac4ad8f78d4067c717094b3d Mon Sep 17 00:00:00 2001 From: Mikko Vuorinen Date: Sun, 1 Apr 2018 21:35:01 +0100 Subject: [PATCH 1/2] [hellojs] fix response type parameter type Add all valid response type values to the type HelloJSDisplayType as per OAuth 2.0 specification (https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#endpoint) --- types/hellojs/index.d.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/types/hellojs/index.d.ts b/types/hellojs/index.d.ts index e8efdaf19c..5b23b29e07 100644 --- a/types/hellojs/index.d.ts +++ b/types/hellojs/index.d.ts @@ -53,7 +53,15 @@ declare namespace hello { type HelloJSResponseCallback = (r: any, headers: any) => void; - type HelloJSTokenResponseType = "token" | "code"; + type HelloJSTokenResponseType = + "code" + | "code id_token" + | "code id_token token" + | "code token" + | "id_token" + | "id_token token" + | "none" + | "token"; type HelloJSDisplayType = "popup" | "page" | "none"; From b6e18405ce0ddfe8e72ede6519b3315a1847a396 Mon Sep 17 00:00:00 2001 From: Mikko Vuorinen Date: Sun, 1 Apr 2018 21:48:11 +0100 Subject: [PATCH 2/2] [hellojs] add test for response_type parameter --- types/hellojs/hellojs-tests.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/hellojs/hellojs-tests.ts b/types/hellojs/hellojs-tests.ts index 4a4e068379..8cf42d11e4 100644 --- a/types/hellojs/hellojs-tests.ts +++ b/types/hellojs/hellojs-tests.ts @@ -4,7 +4,8 @@ hello.init({ oauth: { version: 2, auth: '', - grant: '' + grant: '', + response_type: 'id_token token' }, refresh: true, scope_delim: ' ',