Repository navigation
Com 4330 - #2915
Com 4330#2915ulysseferreira wants to merge 5 commits into
Conversation
6a22b24 to
9441080
Compare
| REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} | ||
| CONSULTING_PROGRAM_IDS: ${{ secrets.CONSULTING_PROGRAM_IDS }} | ||
| CONSULTING_BILLING_ITEM: ${{ secrets.CONSULTING_BILLING_ITEM }} | ||
| WEBSITE_HOSTNAME: http://localhost:8080 |
There was a problem hiding this comment.
Il faudrait utiliser la variable d'env plutot non ?
There was a problem hiding this comment.
les secrets plutôt tu veux dire ? c'est pas une donnée sensible, ça me paraissait overkill de créer un secret pour ça, mais on peut créé une variable github si tu penses qu'il faut pas le mettre en dur pour pouvoir le modifier facilement
There was a problem hiding this comment.
oui pardon je voulais dire secret
There was a problem hiding this comment.
Oui on peut creer une variable
| if (verification.code !== params.token) throw Boom.notFound(); | ||
|
|
||
| const timeElapsed = (Date.now() - code.updatedAt) / 1000; | ||
| const timeElapsed = (Date.now() - verification.updatedAt) / 1000; |
There was a problem hiding this comment.
POurquoi on utilise pas CompaniDate ici ?
| if (!code) throw Boom.notFound(); | ||
| const verification = await IdentityVerification | ||
| .findOneAndUpdate( | ||
| { email: query.email, attempts: { $not: { $gte: MAX_VERIFICATION_ATTEMPTS } } }, |
There was a problem hiding this comment.
C'est volontaire de ne pas reinitialiser a 0 les essais au bout d'un certain temps ? En l'etat qqn qui essaie deux fois il y a un mois et reessaie ajd se voit bloqué
There was a problem hiding this comment.
Non, la personne n'est pas bloquée : les essais sont bien remis à zéro dans le helper authentication. Si la vérification a plus d'1 h, la mise à jour pose attempts: 0 en même temps que le nouveau code.
| }, | ||
| cors: { | ||
| origin: ['*'], | ||
| origin: [process.env.WEBSITE_HOSTNAME, ...[process.env.MOBILE_WEBSITE_HOSTNAME].filter(Boolean)], |
There was a problem hiding this comment.
Pourquoi il faut le reecrire ? [process.env.WEBSITE_HOSTNAME, process.env.MOBILE_WEBSITE_HOSTNAME] ne suffit pas ?
There was a problem hiding this comment.
ça veut dire en gros :
- WEBSITE_HOSTNAME obligatoire, le déploiement ne se fait pas si on a pas renseigné la variable d'env
- MOBILE_WEBSITE_HOSTNAME est ajouté si définie sinon n'est pas prise en compte (dans le cas staging)
5027689 to
285b647
Compare
TESTS 💻
POINTS D'ATTENTION POUR CETTE PR⚠️
J'ai ajouté un modèle spécifique à une structureJ'ai ajouté une variable d'environnementFONCTIONNALITÉS APPS MOBILES 📱
Mes changements impactent l'application erpSi tu as lu cette description, pense à réagir avec un 👁️