Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InvestCustomer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Giang Tran
InvestCustomer
Commits
4efbff3e
Commit
4efbff3e
authored
Jun 30, 2021
by
Nguyễn Thị Thúy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug fingerprint
parent
534162d9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
Login.js
src/Screens/Authen/Login.js
+5
-0
SettingView.js
src/Screens/Setting/SettingView.js
+5
-0
No files found.
src/Screens/Authen/Login.js
View file @
4efbff3e
...
...
@@ -35,6 +35,7 @@ import KeychainService from '../../services/keychainService';
import
*
as
Keychain
from
'react-native-keychain'
;
import
EntypoIcon
from
'react-native-vector-icons/Entypo'
;
import
Icon
from
'react-native-vector-icons/MaterialCommunityIcons'
;
import
DeviceInfo
from
'react-native-device-info'
;
const
Login
=
(
props
)
=>
{
const
{
navigation
}
=
props
;
...
...
@@ -86,8 +87,12 @@ const Login = (props) => {
};
const
getCredentialInfo
=
async
()
=>
{
try
{
const
appBundleId
=
await
DeviceInfo
.
getBundleId
();
// only used for android as default for service on iOS is bundleId
// Retrieve the credentials
const
options
=
{
service
:
Platform
.
OS
===
'ios'
?
undefined
:
appBundleId
,
forceAuth
:
true
,
authenticationPrompt
:
{
title
:
'Authentication needed'
,
cancel
:
'Cancel'
,
...
...
src/Screens/Setting/SettingView.js
View file @
4efbff3e
...
...
@@ -15,6 +15,8 @@ import {showLoading, hideLoading} from '../../actions/loadingAction';
import
{
verifyPassword
}
from
'../../apis/Functions/users'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert'
;
import
TouchID
from
'react-native-touch-id'
import
DeviceInfo
from
'react-native-device-info'
;
const
dataLanguage
=
[
...
...
@@ -81,8 +83,11 @@ const SettingView = (props) => {
});
if
(
res
.
status
==
200
&&
res
.
data
)
{
if
(
res
.
data
.
code
==
200
)
{
const
appBundleId
=
await
DeviceInfo
.
getBundleId
();
// only used for android as default for service on iOS is bundleId
await
Keychain
.
setGenericPassword
(
props
.
user
.
email
,
pass
,
{
service
:
Platform
.
OS
===
'ios'
?
undefined
:
appBundleId
,
accessControl
:
Keychain
.
ACCESS_CONTROL
.
BIOMETRY_CURRENT_SET
,
accessible
:
Keychain
.
ACCESSIBLE
.
WHEN_UNLOCKED_THIS_DEVICE_ONLY
,
});
AsyncStorage
.
setItem
(
KEY
.
IS_LOGIN_BY_BIOMETRY
,
JSON
.
stringify
({
isLoginByBiometry
:
true
}));
setIsEnabled
(
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment