Class

SessionStorageStore

SessionStorageStore()

Constructor

# new SessionStorageStore()

Session store that persists data in the browser's sessionStorage.

sessionStorage is not available in Safari when running in private mode.

This session store does not work with FastBoot. In order to use Ember Simple Auth with FastBoot, configure the CookieStore as the application's session store.

View Source session-stores/session-storage.js, line 9

Extends

Members

String

# static key

The sessionStorage key the store persists data in.

Properties:
Name Type Description
key
Default Value:
  • 'ember_simple_auth-session'

View Source session-stores/session-storage.js, line 33

Methods

# static clear() → {Ember.RSVP.Promise}

Clears the store by deleting the sessionStorageStore.key from sessionStorage.

View Source session-stores/session-storage.js, line 81

A promise that resolves when the store has been cleared successfully and rejects otherwise.

Ember.RSVP.Promise

# static persist(data) → {Ember.RSVP.Promise}

Persists the data in the sessionStorage.

Parameters:
Name Type Description
data Object

The data to persist

View Source session-stores/session-storage.js, line 50

A promise that resolves when the data has successfully been persisted and rejects otherwise.

Ember.RSVP.Promise

# static restore() → {Ember.RSVP.Promise}

Returns all data currently stored in the sessionStorage as a plain object.

View Source session-stores/session-storage.js, line 67

A promise that resolves with the data currently persisted in the store when the data has been restored successfully and rejects otherwise.

Ember.RSVP.Promise