Skip to content
Snippets Groups Projects
Commit 91bdad6e authored by Yuci Gou's avatar Yuci Gou
Browse files

#425 Passport authentication not working for server modules

parent 4ba735c2
No related branches found
No related tags found
2 merge requests!90Dev,!89Shared data model
const superagent = require('superagent')
const config = require('config')
// const authBearer = passport.authenticate('bearer', { session: false })
module.exports = app => {
app.get('/grist/rest/api/search', (req, res) => {
const authBearer = app.locals.passport.authenticate('bearer', {
session: false,
})
app.get('/grist/rest/api/search', authBearer, (req, res) => {
res.set({ 'Content-Type': 'application/json' })
const { query, page } = req.query
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment