@bytexbyte/berifyme-react-sdk 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Login/yoti/Login.js +15 -5
- package/dist/components/OnBoarding/yoti/OnBoarding.js +15 -5
- package/dist/components/SendSns/index.js +3 -2
- package/dist/components/SendSns/legalLinks.js +16 -0
- package/dist/components/VerifyWithPhoneNumber/User/index.js +1 -1
- package/dist/types/components/SendSns/legalLinks.d.ts +3 -0
- package/package.json +1 -1
|
@@ -112,6 +112,20 @@ var Login = function (_a) {
|
|
|
112
112
|
return [4 /*yield*/, berifymeApi.user.getUserByYotiId({ yotiId: user.yotiId })];
|
|
113
113
|
case 9:
|
|
114
114
|
userResponse = _a.sent();
|
|
115
|
+
if ('error' in userResponse) {
|
|
116
|
+
createDeveloperLog({
|
|
117
|
+
userId: user === null || user === void 0 ? void 0 : user.id,
|
|
118
|
+
userDataJson: user,
|
|
119
|
+
source: 'FRONTEND',
|
|
120
|
+
action: 'yoti api',
|
|
121
|
+
sessionToken: token,
|
|
122
|
+
firstDetail: 'getUserByYotiId',
|
|
123
|
+
secondDetail: JSON.stringify(userResponse),
|
|
124
|
+
});
|
|
125
|
+
onError('Oops! Something went wrong. Please try again later.');
|
|
126
|
+
return [2 /*return*/];
|
|
127
|
+
}
|
|
128
|
+
// cuz secondDetail is too long
|
|
115
129
|
createDeveloperLog({
|
|
116
130
|
userId: user === null || user === void 0 ? void 0 : user.id,
|
|
117
131
|
userDataJson: user,
|
|
@@ -119,12 +133,8 @@ var Login = function (_a) {
|
|
|
119
133
|
action: 'yoti api',
|
|
120
134
|
sessionToken: token,
|
|
121
135
|
firstDetail: 'getUserByYotiId',
|
|
122
|
-
secondDetail: JSON.stringify(userResponse),
|
|
136
|
+
secondDetail: JSON.stringify({ yotiId: userResponse.user.yotiId, fullName: userResponse.user.fullName, age: userResponse.user.age, birthDate: userResponse.user.birthDate }),
|
|
123
137
|
});
|
|
124
|
-
if ('error' in userResponse) {
|
|
125
|
-
onError('Oops! Something went wrong. Please try again later.');
|
|
126
|
-
return [2 /*return*/];
|
|
127
|
-
}
|
|
128
138
|
setUser(userResponse.user);
|
|
129
139
|
onSuccess();
|
|
130
140
|
return [3 /*break*/, 12];
|
|
@@ -98,6 +98,20 @@ var OnBoarding = function (_a) {
|
|
|
98
98
|
case 8: return [4 /*yield*/, berifymeApi.user.getUserByYotiId({ yotiId: approveResponse.yotiId })];
|
|
99
99
|
case 9:
|
|
100
100
|
userResponse = _a.sent();
|
|
101
|
+
if ('error' in userResponse) {
|
|
102
|
+
createDeveloperLog({
|
|
103
|
+
userId: user === null || user === void 0 ? void 0 : user.id,
|
|
104
|
+
userDataJson: user,
|
|
105
|
+
source: 'FRONTEND',
|
|
106
|
+
action: 'yoti api',
|
|
107
|
+
sessionToken: token,
|
|
108
|
+
firstDetail: 'getUserByYotiId',
|
|
109
|
+
secondDetail: JSON.stringify(userResponse),
|
|
110
|
+
});
|
|
111
|
+
onError('Oops! Something went wrong. Please try again later.');
|
|
112
|
+
return [2 /*return*/];
|
|
113
|
+
}
|
|
114
|
+
// cuz secondDetail is too long
|
|
101
115
|
createDeveloperLog({
|
|
102
116
|
userId: user === null || user === void 0 ? void 0 : user.id,
|
|
103
117
|
userDataJson: user,
|
|
@@ -105,12 +119,8 @@ var OnBoarding = function (_a) {
|
|
|
105
119
|
action: 'yoti api',
|
|
106
120
|
sessionToken: token,
|
|
107
121
|
firstDetail: 'getUserByYotiId',
|
|
108
|
-
secondDetail: JSON.stringify(userResponse),
|
|
122
|
+
secondDetail: JSON.stringify({ yotiId: userResponse.user.yotiId, fullName: userResponse.user.fullName, age: userResponse.user.age, birthDate: userResponse.user.birthDate }),
|
|
109
123
|
});
|
|
110
|
-
if ('error' in userResponse) {
|
|
111
|
-
onError('Oops! Something went wrong. Please try again later.');
|
|
112
|
-
return [2 /*return*/];
|
|
113
|
-
}
|
|
114
124
|
setUser(userResponse.user);
|
|
115
125
|
onSuccess();
|
|
116
126
|
return [3 /*break*/, 12];
|
|
@@ -48,6 +48,7 @@ import { createDeveloperLog } from '../createDeveloperLog';
|
|
|
48
48
|
import Footer from '../Footer';
|
|
49
49
|
import { processPhoneNumber } from '../phoneNumberProcesser';
|
|
50
50
|
import webauthn from '../../lib/webauthb';
|
|
51
|
+
import LegalLinks from './legalLinks';
|
|
51
52
|
var SendSns = function (_a) {
|
|
52
53
|
var token = _a.token, inputValue = _a.inputValue, setInputValue = _a.setInputValue, setError = _a.setError, setPageStatus = _a.setPageStatus, setProcessedPhoneNumber = _a.setProcessedPhoneNumber, setModalHeight = _a.setModalHeight, setUser = _a.setUser, environment = _a.environment;
|
|
53
54
|
var _b = useState(true), isValid = _b[0], setIsValid = _b[1];
|
|
@@ -153,7 +154,7 @@ var SendSns = function (_a) {
|
|
|
153
154
|
createAuthenticationLog({
|
|
154
155
|
actionType: ActionType.LOGIN,
|
|
155
156
|
userId: deviceUser.user.id,
|
|
156
|
-
vender: '
|
|
157
|
+
vender: 'passkey only',
|
|
157
158
|
token: token,
|
|
158
159
|
isPass: true,
|
|
159
160
|
});
|
|
@@ -330,7 +331,7 @@ var SendSns = function (_a) {
|
|
|
330
331
|
React.createElement(PhoneInput, { country: 'us', value: inputValue, onChange: handleChange, containerStyle: { width: '100%', height: '50px', border: 'none' }, inputStyle: { width: '100%', height: '50px', fontSize: '18px', borderRadius: '12px', backgroundColor: '#F0F0F0' }, buttonStyle: { borderRadius: '12px 0 0 12px', backgroundColor: '#F0F0F0' }, countryCodeEditable: false }),
|
|
331
332
|
React.createElement(Stack, null,
|
|
332
333
|
React.createElement(Typography, { variant: 'body2', color: theme.palette.error.main, alignSelf: 'end' }, errorMessage),
|
|
333
|
-
React.createElement(
|
|
334
|
+
React.createElement(LegalLinks, null)))),
|
|
334
335
|
React.createElement(Stack, { direction: 'row', pb: 4 },
|
|
335
336
|
React.createElement(Box, null,
|
|
336
337
|
React.createElement(Button, { fullWidth: true, variant: 'contained', size: 'large', sx: { minWidth: 170, borderRadius: 4 }, type: "submit", disabled: (!inputValue || loading) }, loading ?
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Typography } from '@mui/material';
|
|
3
|
+
import theme from "../theme";
|
|
4
|
+
var LegalLinks = function () {
|
|
5
|
+
return (React.createElement(React.Fragment, null,
|
|
6
|
+
React.createElement(Typography, { variant: 'body2', color: theme.palette.info.light },
|
|
7
|
+
"By continuing you agree to Berify's",
|
|
8
|
+
' ',
|
|
9
|
+
React.createElement("a", { href: "https://berify.me/terms-conditions/", target: "_blank", rel: "noopener noreferrer", style: { textDecoration: 'underline', color: theme.palette.info.light } }, "Terms & Conditions"),
|
|
10
|
+
' ',
|
|
11
|
+
"and",
|
|
12
|
+
' ',
|
|
13
|
+
React.createElement("a", { href: "https://berify.me/privacy-policy/", target: "_blank", rel: "noopener noreferrer", style: { textDecoration: 'underline', color: theme.palette.info.light } }, "Privacy Policy"),
|
|
14
|
+
".")));
|
|
15
|
+
};
|
|
16
|
+
export default LegalLinks;
|