Skip to content
Snippets Groups Projects
Commit 03dfdd8c authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

fix: return of verifyUserIdentity

parent 3a1b137a
No related branches found
No related tags found
2 merge requests!12Feat/donnes tech debut contrat,!10Feat/rechercher point
Pipeline #39792 failed
......@@ -80,11 +80,8 @@ async function start(fields, cozyParameters) {
log('info', 'User Logging...')
if (await isFirstStart()) {
if (
!(await verifyUserIdentity(fields, baseUrl, apiAuthKey, loginUtilisateur))
) {
throw errors.LOGIN_FAILED
}
await verifyUserIdentity(fields, baseUrl, apiAuthKey, loginUtilisateur)
await createBoConsent()
//TODO: remove because useless ? Done later in code
// const startDate = await getDataStartDate(
......
......@@ -9,6 +9,7 @@ const { getInseeCode } = require('./requests/insee')
* @param {string} baseUrl
* @param {string} apiAuthKey
* @param {string} loginUtilisateur
* @returns {Promise<void>}
*/
async function verifyUserIdentity(
fields,
......@@ -32,7 +33,6 @@ async function verifyUserIdentity(
log('error', 'PointId does not match')
throw errors.LOGIN_FAILED
}
return true
}
module.exports = { verifyUserIdentity }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment