-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat: add 2-factor authentication #18576
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
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
05bccf0
chore: add IsEnabledPage and DisablePage
thiagobrez cb53f86
chore: add CodesPage and VerifyPage
thiagobrez 8174644
chore: finish VerifyPage and SuccessPage design
thiagobrez 6a40c87
chore: finish all UI and connected to API
thiagobrez cf8c297
chore: fix codes download on Android
thiagobrez fc68b8f
chore: test fireworks animation on SuccessPage
thiagobrez ac00e92
chore: cleanup
thiagobrez a450dfb
chore: add spanish translations
thiagobrez 4c59021
chore: replace fireworks svg for animation
thiagobrez c6bdb52
chore: replace TextInput with MagicCodeInput
thiagobrez 9eaba25
chore: UX improvements
thiagobrez a2c5cc5
chore: fix keyboard on top of input
thiagobrez 0cd1361
chore: fix BaseTwoFactorAuthForm component name
thiagobrez 35e8116
chore: fix conflicts
thiagobrez f0e7499
chore: run prettier
thiagobrez 6c23b16
chore: address pr comments
thiagobrez 22af6ea
chore: fix incorrect behavior of hooks
thiagobrez aaefecf
chore: fix Spanish translations, add toggle API fn
thiagobrez 2675466
chore: tweak stepCounter to accept text
thiagobrez 93d8367
chore: refactor route names
thiagobrez 3e8804c
chore: make disable button dangerous
thiagobrez b064454
chore: fix Button used in wrong way
thiagobrez 465c78a
chore: fix design comments
thiagobrez cec6a9a
chore: cleanup
thiagobrez 28129b4
chore: replace TextFileLink with function
thiagobrez 717dfde
chore: resolve conflicts
thiagobrez 8cc3b8b
chore: replace QRCode with QRShare
thiagobrez aa7222c
chore: create a reusable QRCode component
thiagobrez 18e8c39
chore: resolve conflicts
thiagobrez 1e02ef6
chore: add dark exfy logo to qrcode
thiagobrez 68c37b3
chore: clear 2fa onyx store if interrupted
thiagobrez d774b88
chore: resolve conflicts
thiagobrez 1c57a73
chore: fix QRCode logo PropType
thiagobrez 9d68c57
chore: fix prettier
thiagobrez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| import React from 'react'; | ||
| import QRCodeLibrary from 'react-native-qrcode-svg'; | ||
| import PropTypes from 'prop-types'; | ||
| import defaultTheme from '../../styles/themes/default'; | ||
|
|
||
| const propTypes = { | ||
| /** | ||
| * The QR code URL | ||
| */ | ||
| url: PropTypes.string.isRequired, | ||
| /** | ||
| * The logo which will be displayed in the middle of the QR code. | ||
| * Follows `ImageSourcePropType` from react-native. | ||
| */ | ||
| logo: PropTypes.oneOfType([PropTypes.shape({uri: PropTypes.string}), PropTypes.number]), | ||
| /** | ||
| * The QRCode size | ||
| */ | ||
| size: PropTypes.number, | ||
| /** | ||
| * The QRCode color | ||
| */ | ||
| color: PropTypes.string, | ||
| /** | ||
| * The QRCode background color | ||
| */ | ||
| backgroundColor: PropTypes.string, | ||
| /** | ||
| * Function to retrieve the internal component ref and be able to call it's | ||
| * methods | ||
| */ | ||
| getRef: PropTypes.func, | ||
| }; | ||
|
|
||
| const defaultProps = { | ||
| logo: undefined, | ||
| size: 120, | ||
| color: defaultTheme.text, | ||
| backgroundColor: defaultTheme.highlightBG, | ||
| getRef: undefined, | ||
| }; | ||
|
|
||
| function QRCode(props) { | ||
| return ( | ||
| <QRCodeLibrary | ||
| getRef={props.getRef} | ||
| value={props.url} | ||
| size={props.size} | ||
| logo={props.logo} | ||
| logoBackgroundColor="transparent" | ||
| logoSize={props.size * 0.3} | ||
| logoBorderRadius={props.size} | ||
| backgroundColor={props.backgroundColor} | ||
| color={props.color} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| QRCode.displayName = 'QRCode'; | ||
| QRCode.propTypes = propTypes; | ||
| QRCode.defaultProps = defaultProps; | ||
|
|
||
| export default QRCode; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.