Skip to content

Commit

Permalink
WIP – connect on signin
Browse files Browse the repository at this point in the history
* * *

This commit was sponsored by &yet.

Our friends at &yet have been supporters of Hoodie since its earliest days. <3
And they have availability for new projects! We think they’re some of the best
people you can hire anywhere, but you can read what other people have to say
about them and their work here:

https://andyet.com/case-studies/
  • Loading branch information
gr2m committed Dec 23, 2015
1 parent c9b1dd3 commit 9bcc319
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function Hoodie (options) {

api.account.on('signin', function (account) {
api.store.db.__opts.ajax.headers.authorization = 'Bearer ' + account.session.id
api.store.connect()
})
api.account.on('signout', function () {
delete api.store.db.__opts.ajax.headers.authorization
Expand Down

0 comments on commit 9bcc319

Please sign in to comment.