diff options
author | isaacs <i@izs.me> | 2013-06-19 22:02:54 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-06-19 22:02:54 +0400 |
commit | c992ffe60f58edae4c2cc96bc3797d5e40fbc408 (patch) | |
tree | 8d54d38d02c16e8450095fc74f36c04d723aa32b /lib/adduser.js | |
parent | df9a0b370a3e989e60fe2ec28b3c7b17c2458ab7 (diff) |
adduser: Delete token after signing in
Otherwise, switching user accounts will still send a confusing
token cookie to couchdb on subsequent requests, which is not ok.
Diffstat (limited to 'lib/adduser.js')
-rw-r--r-- | lib/adduser.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/adduser.js b/lib/adduser.js index c3ba5fc32..a5b9321d3 100644 --- a/lib/adduser.js +++ b/lib/adduser.js @@ -131,6 +131,7 @@ function save (c, u, cb) { npm.config.set("username", u.u, "user") npm.config.set("_password", u.p, "user") npm.config.set("email", u.e, "user") + npm.config.del("_token", "user") log.info("adduser", "Authorized user %s", u.u) npm.config.save("user", cb) }) |