2024-09-22 14:52:41 -04:00
|
|
|
const authConfig = require('../config/auth.js');
|
|
|
|
|
|
|
|
|
|
class authController {
|
|
|
|
|
|
|
|
|
|
async getActive(req, res, next) {
|
2024-09-22 21:00:15 -04:00
|
|
|
|
2024-09-22 14:52:41 -04:00
|
|
|
try {
|
2024-09-22 21:00:15 -04:00
|
|
|
|
|
|
|
|
const passportConfig = authConfig.getPassportJSConfig();
|
|
|
|
|
const simpleLoginConfig = authConfig.getSimpleLoginConfig();
|
|
|
|
|
|
|
|
|
|
const response = {
|
|
|
|
|
passportConfig,
|
|
|
|
|
simpleLoginConfig
|
2024-09-22 14:52:41 -04:00
|
|
|
};
|
|
|
|
|
|
2024-09-22 21:00:15 -04:00
|
|
|
return res.json(response);
|
2024-09-22 14:52:41 -04:00
|
|
|
}
|
|
|
|
|
catch (error) {
|
2024-09-22 21:00:15 -04:00
|
|
|
return next(error); // Gérer l'erreur
|
2024-09-22 14:52:41 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module.exports = new authController;
|