Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b4d5dbe9e3 |
@@ -43,7 +43,7 @@ const addCustomClaims = (email, customClaims, token) => {
|
|||||||
// Configure our small auth0-mock-server
|
// Configure our small auth0-mock-server
|
||||||
app.options('*', cors(corsOpts))
|
app.options('*', cors(corsOpts))
|
||||||
.use(cors())
|
.use(cors())
|
||||||
.use(bodyParser.json())
|
.use(bodyParser.json({ strict: false }))
|
||||||
.use(bodyParser.urlencoded({ extended: true }))
|
.use(bodyParser.urlencoded({ extended: true }))
|
||||||
.use(cookieParser())
|
.use(cookieParser())
|
||||||
.use(express.static(`${__dirname}/public`))
|
.use(express.static(`${__dirname}/public`))
|
||||||
@@ -274,6 +274,28 @@ app.post('/issuer', (req, res) => {
|
|||||||
res.send('ok')
|
res.send('ok')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
app.get('/api/v2/users-by-email', (req, res) => {
|
||||||
|
res.json([])
|
||||||
|
})
|
||||||
|
|
||||||
|
app.post('/api/v2/users', (req, res) => {
|
||||||
|
const email = req.body.email
|
||||||
|
res.json({
|
||||||
|
user_id: `auth0|${email}`
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
app.post('/api/v2/tickets/password-change', (req, res) => {
|
||||||
|
res.json({
|
||||||
|
ticket: `https://some-url`
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
app.use(function(req, res, next) {
|
||||||
|
console.log('404', req.path)
|
||||||
|
res.status(404).send('error: 404 Not Found ' + req.path)
|
||||||
|
})
|
||||||
|
|
||||||
app.listen(3333, () => {
|
app.listen(3333, () => {
|
||||||
debug('Auth0-Mock-Server listening on port 3333!')
|
debug('Auth0-Mock-Server listening on port 3333!')
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user