return co(function * () { let verify = yield load(verifyAPI, { $$ctx: ctx }) let sign = yield load(apSignAPI, { $$ctx: ctx }) let signed = yield sign.signin(key, password) let profile = yield ctx._profileForUser(signed) let realm = yield ctx._realForUser(signed, host, lang) yield verify.syncNeedsVerify() session.signed = Object.assign(signed, { profile, realm }) return yield ctx.signget() })
return co(function * () { let verify = yield load(verifyAPI, { $$ctx: ctx }) let sign = yield load(apSignAPI, { $$ctx: ctx }) let signed = yield sign.signget() email = email || signed.email let key = signed.key let result = yield sign.signmod({ email, key }, password) Object.assign(session.signed, { email }) if (email) { yield verify.issue() } return result })
return co(function * () { let verify = yield load(verifyAPI, { $$ctx: ctx }) let captcha = yield load(captchaApi, { $$ctx: ctx }) let sign = yield load(apSignAPI, { $$ctx: ctx }) yield captcha.conform(captchaText) yield sign.signup(key, email, password) let signed = yield ctx.signin({ key, password, host }) if (email) { yield verify.issue() } return signed })
return co(function * () { let sign = yield load(apSignAPI, { $$ctx: s }) yield Resignation.create({ content: Object.assign({ reason }) }) yield sign.signdel() })
return co(function * () { let identicon = yield load(identiconAPI, { $$ctx: ctx }) let [profile] = yield UserProfile.findOrCreate({ where: { userId }, defaults: { userId, image: userKey && (yield identicon.userIdenticon(userKey)) } }) return profile })
return co(function * () { let sign = yield load(apSignAPI, { $$ctx: s }) return yield sign.signget() })