From 7fc7053dee1af9c8a4913f8b427485717bdc3e75 Mon Sep 17 00:00:00 2001 From: mgdodge Date: Mon, 20 May 2019 15:12:56 -0600 Subject: [PATCH] Update okta__okta-vue with changes in 1.1 (#35447) * Update okta-vue config options, deps, version # * Clean up formatting --- types/okta__okta-vue/index.d.ts | 18 ++++++++++-------- types/okta__okta-vue/okta__okta-vue-tests.ts | 10 ++++++---- types/okta__okta-vue/package.json | 2 +- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/types/okta__okta-vue/index.d.ts b/types/okta__okta-vue/index.d.ts index 31c2c93f3f..8f992ff3ae 100644 --- a/types/okta__okta-vue/index.d.ts +++ b/types/okta__okta-vue/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for okta-vue 1.0 +// Type definitions for okta-vue 1.1 // Project: https://github.com/okta/okta-oidc-js/tree/master/packages/okta-vue, https://github.com/okta/okta-oidc-js // Definitions by: Mike Dodge // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -8,13 +8,15 @@ import { VueConstructor, PluginFunction } from 'vue'; import { NavigationGuard } from 'vue-router'; declare namespace OktaVuePlugin { - interface OktaVueOptions { - issuer: string; - client_id: string; - redirect_uri: string; + interface OktaVueOptions { + issuer: string; + client_id: string; + redirect_uri: string; scope?: string; response_type?: string; - } + storage?: 'localStorage' | 'sessionStorage' | 'cookie'; + auto_renew?: boolean; + } interface OktaOpenIDOptions { sessionToken?: string; @@ -25,7 +27,7 @@ declare namespace OktaVuePlugin { nonce?: string; } - function install(vm: VueConstructor, options: OktaVueOptions): PluginFunction; + function install(vm: VueConstructor, options: OktaVueOptions): PluginFunction; function handleCallback(): VueConstructor; } declare function OktaVuePlugin(): PluginFunction; @@ -42,7 +44,7 @@ declare module 'vue/types/vue' { getIdToken(): Promise; getAccessToken(): Promise; getUser(): Promise; - authRedirectGuardd(): Promise; + authRedirectGuard(): Promise; }; } } diff --git a/types/okta__okta-vue/okta__okta-vue-tests.ts b/types/okta__okta-vue/okta__okta-vue-tests.ts index 70ec9135f4..89290f7d6f 100644 --- a/types/okta__okta-vue/okta__okta-vue-tests.ts +++ b/types/okta__okta-vue/okta__okta-vue-tests.ts @@ -3,10 +3,12 @@ import Router from 'vue-router'; import Auth from 'okta__okta-vue'; Vue.use(Auth, { - issuer: 'https://{yourOktaDomain}.com/oauth2/default', - client_id: '{client_id}', - redirect_uri: 'http://localhost:{port}/implicit/callback', - scope: 'openid profile email' + issuer: 'https://{yourOktaDomain}.com/oauth2/default', + client_id: '{client_id}', + redirect_uri: 'http://localhost:{port}/implicit/callback', + scope: 'openid profile email', + storage: 'cookie', + auto_renew: false }); Vue.use(Router); diff --git a/types/okta__okta-vue/package.json b/types/okta__okta-vue/package.json index fe98511c31..af92184512 100644 --- a/types/okta__okta-vue/package.json +++ b/types/okta__okta-vue/package.json @@ -1,7 +1,7 @@ { "private": true, "dependencies": { - "vue": "^2.5.9", + "vue": "^2.5.17", "vue-router": "^3.0.1" } }