Skip to content

Commit

Permalink
use import syntax for tiny-emitter
Browse files Browse the repository at this point in the history
  • Loading branch information
shuowu committed Jan 14, 2022
1 parent 4dbc2c5 commit b4d53ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/OktaAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/
/* global window */

import Emitter from 'tiny-emitter';
import {
DEFAULT_MAX_CLOCK_SKEW,
REFERRER_PATH_STORAGE_KEY
Expand Down Expand Up @@ -125,8 +126,6 @@ import {
isTransactionMetaValid
} from './idx/transactionMeta';

const Emitter = require('tiny-emitter');

class OktaAuth implements SDKInterface, SigninAPI, SignoutAPI {
options: OktaAuthOptions;
storageManager: StorageManager;
Expand All @@ -139,7 +138,7 @@ class OktaAuth implements SDKInterface, SigninAPI, SignoutAPI {
features: FeaturesAPI;
token: TokenAPI;
_tokenQueue: PromiseQueue;
emitter: typeof Emitter;
emitter: Emitter;
tokenManager: TokenManager;
authStateManager: AuthStateManager;
http: HttpAPI;
Expand Down
3 changes: 2 additions & 1 deletion test/apps/app/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@


import { OktaAuthOptions } from '@okta/okta-auth-js';
import { CookieAttributes } from 'js-cookie';
import { LOGIN_CALLBACK_PATH, STORAGE_KEY } from './constants';
const HOST = window.location.host;
const PROTO = window.location.protocol;
Expand Down Expand Up @@ -73,7 +74,7 @@ export function getConfigFromUrl(): Config {
const storage = url.searchParams.get('storage') || undefined;
const expireEarlySeconds = +url.searchParams.get('expireEarlySeconds') || undefined;
const secureCookies = url.searchParams.get('secure') !== 'false'; // On by default
const sameSite = url.searchParams.get('sameSite') || undefined;
const sameSite = (url.searchParams.get('sameSite') || undefined) as CookieAttributes['sameSite'];
const siwVersion = url.searchParams.get('siwVersion') || DEFAULT_SIW_VERSION;
const siwAuthClient = url.searchParams.get('siwAuthClient') === 'true'; // off by default
const idps = url.searchParams.get('idps') || '';
Expand Down

0 comments on commit b4d53ea

Please sign in to comment.