Skip to content

Commit

Permalink
#3 default to memory storage
Browse files Browse the repository at this point in the history
just to make this library more isomorphic
  • Loading branch information
prayerslayer committed Aug 11, 2015
1 parent 4a34789 commit d80eca2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/provider.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import querystring from 'querystring';
import {assertPresent, stripKeys, includes, endsWith, startsWith} from './util';
import LocalTokenStorage from './storage/local-storage';
import MemoryStorage from './storage/memory-storage';
import Refresh from './refresh';
import Response from './response';
import OAuthError from './error';
Expand All @@ -10,7 +10,7 @@ class Provider {
assertPresent(config, ['authorization_url', 'id']);
this.id = config.id;
this.authorization_url = config.authorization_url;
this.storage = config.storage || new LocalTokenStorage(this.id, window.localStorage);
this.storage = config.storage || new MemoryStorage();
this.auth_url_has_query = includes.call(this.authorization_url, '?');

if (endsWith.call(this.authorization_url, '/') && !this.auth_url_has_query) {
Expand Down

0 comments on commit d80eca2

Please sign in to comment.