-
-
Save anonymous/c109b87f27dacdd90a11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iff --git a/src/hoodie/account.js b/src/hoodie/account.js | |
index 88a2fab..4d50828 100644 | |
--- a/src/hoodie/account.js | |
+++ b/src/hoodie/account.js | |
@@ -144,7 +144,6 @@ function hoodieAccount(hoodie) { | |
return sendSignUpRequest(username, password) | |
.done(function(newUsername, newHoodieId, newBearerToken) { | |
setUsername(username); | |
- setBearerToken(newBearerToken); | |
account.trigger('signup', username); | |
}); | |
}; | |
@@ -225,7 +224,7 @@ function hoodieAccount(hoodie) { | |
function anonymousSignIn () { | |
var username = hoodie.id(); | |
var password = getAnonymousPassword(); | |
- return account.signIn(username, password).done( function() { | |
+ return account.signIn(username, password, {silent: true}).done( function() { | |
account.trigger('signin:anonymous', username); | |
}); | |
} | |
@@ -277,7 +276,6 @@ function hoodieAccount(hoodie) { | |
if (!isReauthenticating && !options.moveData) { | |
cleanup(); | |
} | |
- setBearerToken(newBearerToken); | |
if (isReauthenticating) { | |
if (!isSilent) { | |
account.trigger('reauthenticated', newUsername); | |
@@ -745,6 +743,7 @@ function hoodieAccount(hoodie) { | |
} | |
authenticated = true; | |
+ setBearerToken(newBearerToken); | |
account.fetch(); | |
return resolveWith(newUsername, newHoodieId, newBearerToken, options); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment