feat: register server-side validation + forgot password UI

This commit is contained in:
Nicolas Giard committed 2018-12-20 23:02:17 -05:00
1 parent 901dbb98e0
commit 78ae137f48
6 files changed
+140 -29

No files matched your search

+4
View File
@@ -30,6 +30,10 @@ module.exports = class Authentication extends Model {
}
}
static async getStrategy(key) {
return WIKI.models.authentication.query().findOne({ key })
}
static async getStrategies(isEnabled) {
const strategies = await WIKI.models.authentication.query().where(_.isBoolean(isEnabled) ? { isEnabled } : {})
return _.sortBy(strategies.map(str => ({