-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two factor authentication #330
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
0d8e185
to
e57419b
Compare
e57419b
to
2db5d62
Compare
2db5d62
to
ed61090
Compare
ed61090
to
9ac9a66
Compare
9ac9a66
to
4788147
Compare
4788147
to
185dfa9
Compare
185dfa9
to
2938874
Compare
2938874
to
217f358
Compare
217f358
to
2cf115d
Compare
2cf115d
to
2fa4c96
Compare
b902494
to
e523695
Compare
e523695
to
0c99c7d
Compare
0c99c7d
to
459ad4e
Compare
459ad4e
to
c2703ed
Compare
c2703ed
to
93637ed
Compare
93637ed
to
04fc02f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const response = await disableTwoFactorAuth({ | ||
variables: { email: userProfileEmail }, | ||
}); | ||
|
||
console.log(response.data.disableTwoFactorAuth); | ||
toast.success('2FA Disabled'); // Display success toast | ||
setIsTwoFactorDisabled(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you don't check the value of response
before setting the new value for setIsTwoFactoDisabled
state, how do you know if disabling was successful?
const response = await enableTwoFactorAuth({ | ||
variables: { email: userProfileEmail }, | ||
}); | ||
|
||
console.log(response.data.enableTwoFactorAuth); | ||
toast.success('OTP check email sent! Check your inbox.'); | ||
setIsTwoFactorEnabled(true); | ||
} catch (error) { | ||
console.error(error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above.
// /* eslint-disable */ | ||
// import { useApolloClient, useMutation } from '@apollo/client'; | ||
// import React, { useContext, useState } from 'react'; | ||
// import { useForm } from 'react-hook-form'; | ||
// import { useTranslation } from 'react-i18next'; | ||
// import { FaRegEnvelope, FaRegEye } from 'react-icons/fa'; | ||
// import { FiEyeOff } from 'react-icons/fi'; | ||
// import { MdLockOutline } from 'react-icons/md'; | ||
// import { | ||
// Link, | ||
// useLocation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a whole file that is full of comments?
|
||
await client.resetStore(); | ||
|
||
toast.success(t(data.loginUser.message) as ToastContent<unknown>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We talked about removing this toast.
Re-implemented. |
PR Description
This is pr is for enabling user for security enhancement on his or her Account by enabling two factor authentication
Description of tasks that were expected to be completed
List all the tasks and sub-tasks that were assigned to you or that you assigned yourself. Make sure you check evey completed task.
How has this been tested?
npm run dev
login using any credentials
on dashboard got to settings
go on privacy and security settings click on change
enable two factor authentication or disable it
By enabling two factor authentication the pop tell we send you code to verify two factor authentication enter code we send you and then 2fa will be enabled on time of login when you have enabled two fa you we the otp code in gmail inbox verify it and then you will progress to Dashboard.
Number of Commits
The number of commits should not exceed 2 commits. In case they are more than that, please take your time and squash them.
Screenshots (If appropriate)
# Please check this Checklist before you submit your PR: