@8base/web-oauth-client
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -1,2 +0,2 @@ | ||
import { IAuthState, IAuthClient, IStorage } from '@8base/utils'; | ||
import { IAuthState, IAuthClient, IStorageOptions } from '@8base/utils'; | ||
interface IWebOAuthClientOptions { | ||
@@ -12,3 +12,3 @@ authorize: (this: WebOAuthClient, ...rest: any) => any | Promise<any>; | ||
private storageAPI; | ||
constructor(options: IWebOAuthClientOptions, storage?: IStorage, storageKey?: string); | ||
constructor(options: IWebOAuthClientOptions, storageOptions?: IStorageOptions<IAuthState>); | ||
setState(state: IAuthState): void; | ||
@@ -15,0 +15,0 @@ getState(): IAuthState; |
@@ -8,5 +8,5 @@ "use strict"; | ||
class WebOAuthClient { | ||
constructor(options, storage = window.localStorage, storageKey = 'auth') { | ||
constructor(options, storageOptions = {}) { | ||
utils_1.throwIfMissingRequiredParameters(['authorize'], utils_1.PACKAGES.WEB_AUTH0_AUTH_CLIENT, options); | ||
this.storageAPI = new utils_1.StorageAPI(storage, storageKey); | ||
this.storageAPI = new utils_1.StorageAPI(storageOptions.storage || window.localStorage, storageOptions.storageKey || 'auth', storageOptions.initialState); | ||
this.options = options; | ||
@@ -13,0 +13,0 @@ } |
{ | ||
"name": "@8base/web-oauth-client", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"author": "8base", | ||
@@ -15,3 +15,3 @@ "repository": "https://github.com/8base/sdk", | ||
"dependencies": { | ||
"@8base/utils": "^1.1.1" | ||
"@8base/utils": "^1.1.2" | ||
}, | ||
@@ -18,0 +18,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8807
Updated@8base/utils@^1.1.2