maofalt / Transcendence

4 stars 0 forks source link

Redirect to 2fa not working #329

Closed YoelRidgway closed 5 months ago

YoelRidgway commented 5 months ago

When I set the 2fa method and try to log in it doesn't properly redirect and it just logs in perfectly. I think it might be to do with the context when verifying in the EditProfile page. Also I need to change this in the 2fa.js file:

https://github.com/maofalt/Transcendence/blob/099717f9a012e393747bf7c79aa6913911a4ae99/srcs/requirements/front-end/vanilla/js/views/LoginPage.js#L156-L159

I need to add a return ; after the redirect to stop it from continuing to login in the function. I have only left it because I want to test to make sure the user_management service is not allowing the user to log in even when the 2fa has not been validated; which is currently the case! However, I think it is just because I added the wrong context, aka. context: login, so it might not be the fault of the backend.