Update okta__okta-vue with changes in 1.1 (#35447)

* Update okta-vue config options, deps, version #

* Clean up formatting
This commit is contained in:
mgdodge
2019-05-20 14:12:55 -07:00
committed by Ryan Cavanaugh
parent 1a6d749bd5
commit 7fc7053dee
3 changed files with 17 additions and 13 deletions
+10 -8
View File
@@ -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 <https://github.com/innovation-team>
// 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<VueConstructor>;
function install(vm: VueConstructor, options: OktaVueOptions): PluginFunction<VueConstructor>;
function handleCallback(): VueConstructor;
}
declare function OktaVuePlugin(): PluginFunction<VueConstructor>;
@@ -42,7 +44,7 @@ declare module 'vue/types/vue' {
getIdToken(): Promise<string>;
getAccessToken(): Promise<string>;
getUser(): Promise<any>;
authRedirectGuardd(): Promise<NavigationGuard>;
authRedirectGuard(): Promise<NavigationGuard>;
};
}
}
+6 -4
View File
@@ -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);
+1 -1
View File
@@ -1,7 +1,7 @@
{
"private": true,
"dependencies": {
"vue": "^2.5.9",
"vue": "^2.5.17",
"vue-router": "^3.0.1"
}
}