Budibase is an open-source low-code platform for creating internal apps in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s 🚀
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
424 B

const jwt = require("jsonwebtoken")
const CouchDB = require("../../../db")
const passport = require("@budibase/auth")
exports.authenticate = async (ctx, next) => {
return passport.authenticate("local", async (err, user, info, status) => {
// TODO: better
if (err) {
ctx.throw(err)
}
// await ctx.login(user)
ctx.body = {
err,
user,
info,
status,
}
})(ctx, next)
}