@onairos/react-native 1.0.0
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/README.md +334 -0
- package/lib/commonjs/components/DataRequestModal.js +176 -0
- package/lib/commonjs/components/DataRequestModal.js.map +1 -0
- package/lib/commonjs/components/Notification.js +106 -0
- package/lib/commonjs/components/Notification.js.map +1 -0
- package/lib/commonjs/components/OnairosButton.js +575 -0
- package/lib/commonjs/components/OnairosButton.js.map +1 -0
- package/lib/commonjs/components/Overlay.js +818 -0
- package/lib/commonjs/components/Overlay.js.map +1 -0
- package/lib/commonjs/components/UniversalOnboarding.js +173 -0
- package/lib/commonjs/components/UniversalOnboarding.js.map +1 -0
- package/lib/commonjs/components/onboarding/OAuthWebView.js +137 -0
- package/lib/commonjs/components/onboarding/OAuthWebView.js.map +1 -0
- package/lib/commonjs/components/onboarding/OnboardingHeader.js +74 -0
- package/lib/commonjs/components/onboarding/OnboardingHeader.js.map +1 -0
- package/lib/commonjs/components/onboarding/PinInput.js +283 -0
- package/lib/commonjs/components/onboarding/PinInput.js.map +1 -0
- package/lib/commonjs/components/onboarding/PlatformConnector.js +244 -0
- package/lib/commonjs/components/onboarding/PlatformConnector.js.map +1 -0
- package/lib/commonjs/components/screens/ConnectorScreen.js +145 -0
- package/lib/commonjs/components/screens/ConnectorScreen.js.map +1 -0
- package/lib/commonjs/components/screens/LoadingScreen.js +91 -0
- package/lib/commonjs/components/screens/LoadingScreen.js.map +1 -0
- package/lib/commonjs/components/screens/PinCreationScreen.js +61 -0
- package/lib/commonjs/components/screens/PinCreationScreen.js.map +1 -0
- package/lib/commonjs/constants/index.js +78 -0
- package/lib/commonjs/constants/index.js.map +1 -0
- package/lib/commonjs/hooks/useConnections.js +89 -0
- package/lib/commonjs/hooks/useConnections.js.map +1 -0
- package/lib/commonjs/hooks/useCredentials.js +85 -0
- package/lib/commonjs/hooks/useCredentials.js.map +1 -0
- package/lib/commonjs/index.js +282 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/services/oauthService.js +362 -0
- package/lib/commonjs/services/oauthService.js.map +1 -0
- package/lib/commonjs/types/declarations.d.js +2 -0
- package/lib/commonjs/types/declarations.d.js.map +1 -0
- package/lib/commonjs/types/index.js +2 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/utils/api.js +129 -0
- package/lib/commonjs/utils/api.js.map +1 -0
- package/lib/commonjs/utils/auth.js +111 -0
- package/lib/commonjs/utils/auth.js.map +1 -0
- package/lib/commonjs/utils/crypto.js +62 -0
- package/lib/commonjs/utils/crypto.js.map +1 -0
- package/lib/commonjs/utils/debugHelper.js +64 -0
- package/lib/commonjs/utils/debugHelper.js.map +1 -0
- package/lib/commonjs/utils/onairosApi.js +270 -0
- package/lib/commonjs/utils/onairosApi.js.map +1 -0
- package/lib/commonjs/utils/secureStorage.js +210 -0
- package/lib/commonjs/utils/secureStorage.js.map +1 -0
- package/lib/module/components/DataRequestModal.js +168 -0
- package/lib/module/components/DataRequestModal.js.map +1 -0
- package/lib/module/components/Notification.js +99 -0
- package/lib/module/components/Notification.js.map +1 -0
- package/lib/module/components/OnairosButton.js +550 -0
- package/lib/module/components/OnairosButton.js.map +1 -0
- package/lib/module/components/Overlay.js +825 -0
- package/lib/module/components/Overlay.js.map +1 -0
- package/lib/module/components/UniversalOnboarding.js +164 -0
- package/lib/module/components/UniversalOnboarding.js.map +1 -0
- package/lib/module/components/onboarding/OAuthWebView.js +128 -0
- package/lib/module/components/onboarding/OAuthWebView.js.map +1 -0
- package/lib/module/components/onboarding/OnboardingHeader.js +66 -0
- package/lib/module/components/onboarding/OnboardingHeader.js.map +1 -0
- package/lib/module/components/onboarding/PinInput.js +274 -0
- package/lib/module/components/onboarding/PinInput.js.map +1 -0
- package/lib/module/components/onboarding/PlatformConnector.js +235 -0
- package/lib/module/components/onboarding/PlatformConnector.js.map +1 -0
- package/lib/module/components/screens/ConnectorScreen.js +137 -0
- package/lib/module/components/screens/ConnectorScreen.js.map +1 -0
- package/lib/module/components/screens/LoadingScreen.js +83 -0
- package/lib/module/components/screens/LoadingScreen.js.map +1 -0
- package/lib/module/components/screens/PinCreationScreen.js +53 -0
- package/lib/module/components/screens/PinCreationScreen.js.map +1 -0
- package/lib/module/constants/index.js +72 -0
- package/lib/module/constants/index.js.map +1 -0
- package/lib/module/hooks/useConnections.js +81 -0
- package/lib/module/hooks/useConnections.js.map +1 -0
- package/lib/module/hooks/useCredentials.js +77 -0
- package/lib/module/hooks/useCredentials.js.map +1 -0
- package/lib/module/index.js +34 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/services/oauthService.js +352 -0
- package/lib/module/services/oauthService.js.map +1 -0
- package/lib/module/types/declarations.d.js +2 -0
- package/lib/module/types/declarations.d.js.map +1 -0
- package/lib/module/types/index.js +2 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/utils/api.js +117 -0
- package/lib/module/utils/api.js.map +1 -0
- package/lib/module/utils/auth.js +99 -0
- package/lib/module/utils/auth.js.map +1 -0
- package/lib/module/utils/crypto.js +54 -0
- package/lib/module/utils/crypto.js.map +1 -0
- package/lib/module/utils/debugHelper.js +54 -0
- package/lib/module/utils/debugHelper.js.map +1 -0
- package/lib/module/utils/onairosApi.js +256 -0
- package/lib/module/utils/onairosApi.js.map +1 -0
- package/lib/module/utils/secureStorage.js +196 -0
- package/lib/module/utils/secureStorage.js.map +1 -0
- package/package.json +115 -0
- package/src/components/DataRequestModal.tsx +187 -0
- package/src/components/Notification.js +101 -0
- package/src/components/OnairosButton.js +604 -0
- package/src/components/OnairosButton.tsx +182 -0
- package/src/components/Overlay.js +854 -0
- package/src/components/Overlay.tsx +272 -0
- package/src/components/UniversalOnboarding.tsx +184 -0
- package/src/components/onboarding/OAuthWebView.tsx +134 -0
- package/src/components/onboarding/OnboardingHeader.tsx +70 -0
- package/src/components/onboarding/PinInput.tsx +356 -0
- package/src/components/onboarding/PlatformConnector.tsx +297 -0
- package/src/components/screens/ConnectorScreen.tsx +152 -0
- package/src/components/screens/LoadingScreen.tsx +100 -0
- package/src/components/screens/PinCreationScreen.tsx +67 -0
- package/src/constants/index.ts +78 -0
- package/src/hooks/useConnections.ts +90 -0
- package/src/hooks/useCredentials.ts +83 -0
- package/src/index.js +14 -0
- package/src/index.ts +82 -0
- package/src/services/oauthService.ts +360 -0
- package/src/types/declarations.d.ts +26 -0
- package/src/types/index.ts +82 -0
- package/src/utils/api.js +112 -0
- package/src/utils/auth.js +104 -0
- package/src/utils/crypto.js +60 -0
- package/src/utils/debugHelper.ts +53 -0
- package/src/utils/onairosApi.ts +303 -0
- package/src/utils/secureStorage.ts +230 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "API_ENDPOINTS", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _constants.API_ENDPOINTS;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "COLORS", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _constants.COLORS;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "ConnectorScreen", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _ConnectorScreen.ConnectorScreen;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "DEEP_LINK_CONFIG", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _constants.DEEP_LINK_CONFIG;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "LoadingScreen", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _LoadingScreen.LoadingScreen;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "OAuthWebView", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _OAuthWebView.OAuthWebView;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "OnairosButton", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _OnairosButton.OnairosButton;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "OnboardingHeader", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _OnboardingHeader.OnboardingHeader;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "Overlay", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _Overlay.Overlay;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "PIN_REQUIREMENTS", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _constants.PIN_REQUIREMENTS;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "PLATFORMS", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _constants.PLATFORMS;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "PinCreationScreen", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _PinCreationScreen.PinCreationScreen;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "PinInput", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _PinInput.PinInput;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "PlatformConnector", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _PlatformConnector.PlatformConnector;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "STORAGE_KEYS", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _constants.STORAGE_KEYS;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "UniversalOnboarding", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _UniversalOnboarding.UniversalOnboarding;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "authenticate", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () {
|
|
105
|
+
return _onairosApi.authenticate;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "base64ToBuffer", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _crypto.base64ToBuffer;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "cleanupOAuthService", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () {
|
|
117
|
+
return _oauthService.cleanupOAuthService;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "connectPlatform", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _oauthService.connectPlatform;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
Object.defineProperty(exports, "createAccount", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () {
|
|
129
|
+
return _onairosApi.createAccount;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, "deleteCredentials", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () {
|
|
135
|
+
return _secureStorage.deleteCredentials;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
Object.defineProperty(exports, "disconnectPlatform", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function () {
|
|
141
|
+
return _oauthService.disconnectPlatform;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports, "generateDeviceUsername", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () {
|
|
147
|
+
return _secureStorage.generateDeviceUsername;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
Object.defineProperty(exports, "getCredentials", {
|
|
151
|
+
enumerable: true,
|
|
152
|
+
get: function () {
|
|
153
|
+
return _secureStorage.getCredentials;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
Object.defineProperty(exports, "getPlatformData", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function () {
|
|
159
|
+
return _onairosApi.getPlatformData;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
Object.defineProperty(exports, "getUserProfile", {
|
|
163
|
+
enumerable: true,
|
|
164
|
+
get: function () {
|
|
165
|
+
return _onairosApi.getUserProfile;
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
Object.defineProperty(exports, "hasCredentials", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
get: function () {
|
|
171
|
+
return _secureStorage.hasCredentials;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
Object.defineProperty(exports, "initializeOAuthService", {
|
|
175
|
+
enumerable: true,
|
|
176
|
+
get: function () {
|
|
177
|
+
return _oauthService.initializeOAuthService;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
Object.defineProperty(exports, "isDebugMode", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: function () {
|
|
183
|
+
return _debugHelper.isDebugMode;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
Object.defineProperty(exports, "logDebug", {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
get: function () {
|
|
189
|
+
return _debugHelper.logDebug;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(exports, "logError", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function () {
|
|
195
|
+
return _debugHelper.logError;
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
Object.defineProperty(exports, "refreshToken", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
get: function () {
|
|
201
|
+
return _onairosApi.refreshToken;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
Object.defineProperty(exports, "rsaEncrypt", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function () {
|
|
207
|
+
return _crypto.rsaEncrypt;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
Object.defineProperty(exports, "sha256", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function () {
|
|
213
|
+
return _crypto.sha256;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(exports, "storeCredentials", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function () {
|
|
219
|
+
return _secureStorage.storeCredentials;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
Object.defineProperty(exports, "storePlatformConnection", {
|
|
223
|
+
enumerable: true,
|
|
224
|
+
get: function () {
|
|
225
|
+
return _oauthService.storePlatformConnection;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
Object.defineProperty(exports, "updateCredentials", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function () {
|
|
231
|
+
return _secureStorage.updateCredentials;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
Object.defineProperty(exports, "updatePlatformConnections", {
|
|
235
|
+
enumerable: true,
|
|
236
|
+
get: function () {
|
|
237
|
+
return _onairosApi.updatePlatformConnections;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
Object.defineProperty(exports, "useConnections", {
|
|
241
|
+
enumerable: true,
|
|
242
|
+
get: function () {
|
|
243
|
+
return _useConnections.useConnections;
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
Object.defineProperty(exports, "useCredentials", {
|
|
247
|
+
enumerable: true,
|
|
248
|
+
get: function () {
|
|
249
|
+
return _useCredentials.useCredentials;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
Object.defineProperty(exports, "validateCredentials", {
|
|
253
|
+
enumerable: true,
|
|
254
|
+
get: function () {
|
|
255
|
+
return _onairosApi.validateCredentials;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
Object.defineProperty(exports, "verifyCredentials", {
|
|
259
|
+
enumerable: true,
|
|
260
|
+
get: function () {
|
|
261
|
+
return _secureStorage.verifyCredentials;
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
var _OnairosButton = require("./components/OnairosButton");
|
|
265
|
+
var _UniversalOnboarding = require("./components/UniversalOnboarding");
|
|
266
|
+
var _Overlay = require("./components/Overlay");
|
|
267
|
+
var _ConnectorScreen = require("./components/screens/ConnectorScreen");
|
|
268
|
+
var _PinCreationScreen = require("./components/screens/PinCreationScreen");
|
|
269
|
+
var _LoadingScreen = require("./components/screens/LoadingScreen");
|
|
270
|
+
var _OAuthWebView = require("./components/onboarding/OAuthWebView");
|
|
271
|
+
var _PlatformConnector = require("./components/onboarding/PlatformConnector");
|
|
272
|
+
var _OnboardingHeader = require("./components/onboarding/OnboardingHeader");
|
|
273
|
+
var _PinInput = require("./components/onboarding/PinInput");
|
|
274
|
+
var _useConnections = require("./hooks/useConnections");
|
|
275
|
+
var _useCredentials = require("./hooks/useCredentials");
|
|
276
|
+
var _secureStorage = require("./utils/secureStorage");
|
|
277
|
+
var _onairosApi = require("./utils/onairosApi");
|
|
278
|
+
var _crypto = require("./utils/crypto");
|
|
279
|
+
var _debugHelper = require("./utils/debugHelper");
|
|
280
|
+
var _oauthService = require("./services/oauthService");
|
|
281
|
+
var _constants = require("./constants");
|
|
282
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_OnairosButton","require","_UniversalOnboarding","_Overlay","_ConnectorScreen","_PinCreationScreen","_LoadingScreen","_OAuthWebView","_PlatformConnector","_OnboardingHeader","_PinInput","_useConnections","_useCredentials","_secureStorage","_onairosApi","_crypto","_debugHelper","_oauthService","_constants"],"sourceRoot":"..\\..\\src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAGA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AAGA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,kBAAA,GAAAP,OAAA;AACA,IAAAQ,iBAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AAGA,IAAAU,eAAA,GAAAV,OAAA;AACA,IAAAW,eAAA,GAAAX,OAAA;AAGA,IAAAY,cAAA,GAAAZ,OAAA;AAUA,IAAAa,WAAA,GAAAb,OAAA;AAUA,IAAAc,OAAA,GAAAd,OAAA;AAMA,IAAAe,YAAA,GAAAf,OAAA;AAOA,IAAAgB,aAAA,GAAAhB,OAAA;AA2BA,IAAAiB,UAAA,GAAAjB,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.storePlatformConnection = exports.initializeOAuthService = exports.disconnectPlatform = exports.connectPlatform = exports.cleanupOAuthService = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _secureStorage = require("../utils/secureStorage");
|
|
9
|
+
var _crypto = require("../utils/crypto");
|
|
10
|
+
// Define OAuth configuration types
|
|
11
|
+
|
|
12
|
+
// Platform-specific OAuth configurations
|
|
13
|
+
const OAUTH_CONFIGS = {
|
|
14
|
+
instagram: {
|
|
15
|
+
clientId: 'YOUR_INSTAGRAM_CLIENT_ID',
|
|
16
|
+
// Replace with actual client ID
|
|
17
|
+
redirectUri: 'onairosreact://auth/instagram',
|
|
18
|
+
scope: 'user_profile,user_media',
|
|
19
|
+
authorizationEndpoint: 'https://api.instagram.com/oauth/authorize',
|
|
20
|
+
tokenEndpoint: 'https://api.instagram.com/oauth/access_token',
|
|
21
|
+
responseType: 'code'
|
|
22
|
+
},
|
|
23
|
+
youtube: {
|
|
24
|
+
clientId: 'YOUR_YOUTUBE_CLIENT_ID',
|
|
25
|
+
// Replace with actual client ID
|
|
26
|
+
redirectUri: 'onairosreact://auth/youtube',
|
|
27
|
+
scope: 'https://www.googleapis.com/auth/youtube.readonly',
|
|
28
|
+
authorizationEndpoint: 'https://accounts.google.com/o/oauth2/auth',
|
|
29
|
+
tokenEndpoint: 'https://oauth2.googleapis.com/token',
|
|
30
|
+
responseType: 'code'
|
|
31
|
+
},
|
|
32
|
+
pinterest: {
|
|
33
|
+
clientId: 'YOUR_PINTEREST_CLIENT_ID',
|
|
34
|
+
// Replace with actual client ID
|
|
35
|
+
redirectUri: 'onairosreact://auth/pinterest',
|
|
36
|
+
scope: 'boards:read,pins:read',
|
|
37
|
+
authorizationEndpoint: 'https://www.pinterest.com/oauth/',
|
|
38
|
+
tokenEndpoint: 'https://api.pinterest.com/v5/oauth/token',
|
|
39
|
+
responseType: 'code'
|
|
40
|
+
},
|
|
41
|
+
reddit: {
|
|
42
|
+
clientId: 'YOUR_REDDIT_CLIENT_ID',
|
|
43
|
+
// Replace with actual client ID
|
|
44
|
+
redirectUri: 'onairosreact://auth/reddit',
|
|
45
|
+
scope: 'identity,read',
|
|
46
|
+
authorizationEndpoint: 'https://www.reddit.com/api/v1/authorize',
|
|
47
|
+
tokenEndpoint: 'https://www.reddit.com/api/v1/access_token',
|
|
48
|
+
responseType: 'code'
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Generate a state value for OAuth to prevent CSRF attacks
|
|
54
|
+
*/
|
|
55
|
+
const generateState = () => {
|
|
56
|
+
const randomValue = Math.random().toString(36).substring(2, 15);
|
|
57
|
+
return (0, _crypto.sha256)(randomValue).substring(0, 10);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Initialize OAuth service handlers and listeners
|
|
62
|
+
*/
|
|
63
|
+
const initializeOAuthService = () => {
|
|
64
|
+
// Set up deep linking handlers for OAuth redirects
|
|
65
|
+
_reactNative.Linking.addEventListener('url', handleDeepLink);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Clean up OAuth service handlers and listeners
|
|
70
|
+
*/
|
|
71
|
+
exports.initializeOAuthService = initializeOAuthService;
|
|
72
|
+
const cleanupOAuthService = () => {
|
|
73
|
+
// Clean up deep linking handlers
|
|
74
|
+
if (_reactNative.Platform.OS === 'android') {
|
|
75
|
+
_reactNative.Linking.removeEventListener('url', handleDeepLink);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// Keep track of current OAuth state and callbacks
|
|
80
|
+
exports.cleanupOAuthService = cleanupOAuthService;
|
|
81
|
+
let currentOAuthState = null;
|
|
82
|
+
let currentOAuthPlatform = null;
|
|
83
|
+
let currentOAuthResolve = null;
|
|
84
|
+
let currentOAuthReject = null;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Handle deep link callbacks from OAuth providers
|
|
88
|
+
*/
|
|
89
|
+
const handleDeepLink = async event => {
|
|
90
|
+
try {
|
|
91
|
+
const {
|
|
92
|
+
url
|
|
93
|
+
} = event;
|
|
94
|
+
|
|
95
|
+
// Check if this is an OAuth callback URL
|
|
96
|
+
if (!url.startsWith('onairosreact://auth/')) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Extract platform from URL path
|
|
101
|
+
const platform = url.split('onairosreact://auth/')[1].split('?')[0];
|
|
102
|
+
|
|
103
|
+
// Only handle if it matches current OAuth flow
|
|
104
|
+
if (platform !== currentOAuthPlatform) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Parse URL parameters
|
|
109
|
+
const params = new URL(url).searchParams;
|
|
110
|
+
const code = params.get('code');
|
|
111
|
+
const state = params.get('state');
|
|
112
|
+
const error = params.get('error');
|
|
113
|
+
|
|
114
|
+
// Validate state to prevent CSRF attacks
|
|
115
|
+
if (state !== currentOAuthState) {
|
|
116
|
+
if (currentOAuthReject) {
|
|
117
|
+
currentOAuthReject(new Error('OAuth state mismatch - possible CSRF attack'));
|
|
118
|
+
}
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Handle errors
|
|
123
|
+
if (error) {
|
|
124
|
+
if (currentOAuthReject) {
|
|
125
|
+
currentOAuthReject(new Error(`OAuth error: ${error}`));
|
|
126
|
+
}
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Proceed with token exchange if code is present
|
|
131
|
+
if (code) {
|
|
132
|
+
const tokenResult = await exchangeCodeForToken(platform, code);
|
|
133
|
+
if (currentOAuthResolve) {
|
|
134
|
+
currentOAuthResolve(tokenResult);
|
|
135
|
+
}
|
|
136
|
+
} else {
|
|
137
|
+
if (currentOAuthReject) {
|
|
138
|
+
currentOAuthReject(new Error('No authorization code received'));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
} catch (error) {
|
|
142
|
+
console.error('Error handling OAuth deep link:', error);
|
|
143
|
+
if (currentOAuthReject) {
|
|
144
|
+
currentOAuthReject(error);
|
|
145
|
+
}
|
|
146
|
+
} finally {
|
|
147
|
+
// Reset state
|
|
148
|
+
currentOAuthState = null;
|
|
149
|
+
currentOAuthPlatform = null;
|
|
150
|
+
currentOAuthResolve = null;
|
|
151
|
+
currentOAuthReject = null;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Exchange OAuth authorization code for access token
|
|
157
|
+
*/
|
|
158
|
+
const exchangeCodeForToken = async (platform, code) => {
|
|
159
|
+
try {
|
|
160
|
+
const config = OAUTH_CONFIGS[platform];
|
|
161
|
+
if (!config) {
|
|
162
|
+
throw new Error(`Unsupported platform: ${platform}`);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Prepare token request parameters
|
|
166
|
+
const params = new URLSearchParams({
|
|
167
|
+
grant_type: 'authorization_code',
|
|
168
|
+
code,
|
|
169
|
+
redirect_uri: config.redirectUri,
|
|
170
|
+
client_id: config.clientId
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// Exchange code for token
|
|
174
|
+
const response = await fetch(config.tokenEndpoint, {
|
|
175
|
+
method: 'POST',
|
|
176
|
+
headers: {
|
|
177
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
178
|
+
},
|
|
179
|
+
body: params.toString()
|
|
180
|
+
});
|
|
181
|
+
const data = await response.json();
|
|
182
|
+
if (!response.ok) {
|
|
183
|
+
throw new Error(data.error || 'Failed to exchange code for token');
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Fetch user information based on the platform
|
|
187
|
+
const userInfo = await fetchUserInfo(platform, data.access_token);
|
|
188
|
+
return {
|
|
189
|
+
token: data.access_token,
|
|
190
|
+
refreshToken: data.refresh_token,
|
|
191
|
+
expiresIn: data.expires_in,
|
|
192
|
+
username: userInfo.username,
|
|
193
|
+
userId: userInfo.id
|
|
194
|
+
};
|
|
195
|
+
} catch (error) {
|
|
196
|
+
console.error(`Error exchanging code for token (${platform}):`, error);
|
|
197
|
+
throw error;
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Fetch user information from the connected platform
|
|
203
|
+
*/
|
|
204
|
+
const fetchUserInfo = async (platform, accessToken) => {
|
|
205
|
+
try {
|
|
206
|
+
let endpoint;
|
|
207
|
+
let headers = {
|
|
208
|
+
Authorization: `Bearer ${accessToken}`
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
// Platform-specific API endpoints for user info
|
|
212
|
+
switch (platform) {
|
|
213
|
+
case 'instagram':
|
|
214
|
+
endpoint = 'https://graph.instagram.com/me?fields=id,username';
|
|
215
|
+
break;
|
|
216
|
+
case 'youtube':
|
|
217
|
+
endpoint = 'https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true';
|
|
218
|
+
break;
|
|
219
|
+
case 'pinterest':
|
|
220
|
+
endpoint = 'https://api.pinterest.com/v5/user_account';
|
|
221
|
+
break;
|
|
222
|
+
case 'reddit':
|
|
223
|
+
endpoint = 'https://oauth.reddit.com/api/v1/me';
|
|
224
|
+
break;
|
|
225
|
+
default:
|
|
226
|
+
throw new Error(`Unsupported platform: ${platform}`);
|
|
227
|
+
}
|
|
228
|
+
const response = await fetch(endpoint, {
|
|
229
|
+
headers
|
|
230
|
+
});
|
|
231
|
+
const data = await response.json();
|
|
232
|
+
if (!response.ok) {
|
|
233
|
+
throw new Error(data.error || 'Failed to fetch user info');
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// Extract user information based on platform-specific response format
|
|
237
|
+
switch (platform) {
|
|
238
|
+
case 'instagram':
|
|
239
|
+
return {
|
|
240
|
+
id: data.id,
|
|
241
|
+
username: data.username
|
|
242
|
+
};
|
|
243
|
+
case 'youtube':
|
|
244
|
+
return {
|
|
245
|
+
id: data.items[0].id,
|
|
246
|
+
username: data.items[0].snippet.title
|
|
247
|
+
};
|
|
248
|
+
case 'pinterest':
|
|
249
|
+
return {
|
|
250
|
+
id: data.id,
|
|
251
|
+
username: data.username || data.full_name
|
|
252
|
+
};
|
|
253
|
+
case 'reddit':
|
|
254
|
+
return {
|
|
255
|
+
id: data.id,
|
|
256
|
+
username: data.name
|
|
257
|
+
};
|
|
258
|
+
default:
|
|
259
|
+
throw new Error(`Unsupported platform: ${platform}`);
|
|
260
|
+
}
|
|
261
|
+
} catch (error) {
|
|
262
|
+
console.error(`Error fetching user info (${platform}):`, error);
|
|
263
|
+
throw error;
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Initiate OAuth flow for a specific platform
|
|
269
|
+
*/
|
|
270
|
+
const connectPlatform = platform => {
|
|
271
|
+
return new Promise((resolve, reject) => {
|
|
272
|
+
try {
|
|
273
|
+
const config = OAUTH_CONFIGS[platform];
|
|
274
|
+
if (!config) {
|
|
275
|
+
reject(new Error(`Unsupported platform: ${platform}`));
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// Generate and save state for CSRF protection
|
|
280
|
+
const state = generateState();
|
|
281
|
+
currentOAuthState = state;
|
|
282
|
+
currentOAuthPlatform = platform;
|
|
283
|
+
currentOAuthResolve = resolve;
|
|
284
|
+
currentOAuthReject = reject;
|
|
285
|
+
|
|
286
|
+
// Build OAuth URL
|
|
287
|
+
const authUrl = new URL(config.authorizationEndpoint);
|
|
288
|
+
authUrl.searchParams.append('client_id', config.clientId);
|
|
289
|
+
authUrl.searchParams.append('redirect_uri', config.redirectUri);
|
|
290
|
+
authUrl.searchParams.append('response_type', config.responseType);
|
|
291
|
+
authUrl.searchParams.append('scope', config.scope);
|
|
292
|
+
authUrl.searchParams.append('state', state);
|
|
293
|
+
|
|
294
|
+
// Open browser to start OAuth flow
|
|
295
|
+
_reactNative.Linking.openURL(authUrl.toString());
|
|
296
|
+
} catch (error) {
|
|
297
|
+
reject(error);
|
|
298
|
+
|
|
299
|
+
// Reset state on error
|
|
300
|
+
currentOAuthState = null;
|
|
301
|
+
currentOAuthPlatform = null;
|
|
302
|
+
currentOAuthResolve = null;
|
|
303
|
+
currentOAuthReject = null;
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Disconnect a platform by removing its credentials
|
|
310
|
+
*/
|
|
311
|
+
exports.connectPlatform = connectPlatform;
|
|
312
|
+
const disconnectPlatform = async (platform, credentials) => {
|
|
313
|
+
try {
|
|
314
|
+
if (!credentials.platforms) {
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// Create new credentials object with the platform removed
|
|
319
|
+
const updatedPlatforms = {
|
|
320
|
+
...credentials.platforms
|
|
321
|
+
};
|
|
322
|
+
delete updatedPlatforms[platform];
|
|
323
|
+
|
|
324
|
+
// Update stored credentials
|
|
325
|
+
const result = await (0, _secureStorage.updateCredentials)({
|
|
326
|
+
platforms: updatedPlatforms
|
|
327
|
+
});
|
|
328
|
+
return result;
|
|
329
|
+
} catch (error) {
|
|
330
|
+
console.error(`Error disconnecting platform (${platform}):`, error);
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Store platform connection in credentials
|
|
337
|
+
*/
|
|
338
|
+
exports.disconnectPlatform = disconnectPlatform;
|
|
339
|
+
const storePlatformConnection = async (platform, connectionData, credentials) => {
|
|
340
|
+
try {
|
|
341
|
+
// Create updated platforms object
|
|
342
|
+
const updatedPlatforms = {
|
|
343
|
+
...credentials.platforms,
|
|
344
|
+
[platform]: {
|
|
345
|
+
token: connectionData.token,
|
|
346
|
+
username: connectionData.username,
|
|
347
|
+
userId: connectionData.userId
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
// Update stored credentials
|
|
352
|
+
const result = await (0, _secureStorage.updateCredentials)({
|
|
353
|
+
platforms: updatedPlatforms
|
|
354
|
+
});
|
|
355
|
+
return result;
|
|
356
|
+
} catch (error) {
|
|
357
|
+
console.error(`Error storing platform connection (${platform}):`, error);
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
exports.storePlatformConnection = storePlatformConnection;
|
|
362
|
+
//# sourceMappingURL=oauthService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_secureStorage","_crypto","OAUTH_CONFIGS","instagram","clientId","redirectUri","scope","authorizationEndpoint","tokenEndpoint","responseType","youtube","pinterest","reddit","generateState","randomValue","Math","random","toString","substring","sha256","initializeOAuthService","Linking","addEventListener","handleDeepLink","exports","cleanupOAuthService","Platform","OS","removeEventListener","currentOAuthState","currentOAuthPlatform","currentOAuthResolve","currentOAuthReject","event","url","startsWith","platform","split","params","URL","searchParams","code","get","state","error","Error","tokenResult","exchangeCodeForToken","console","config","URLSearchParams","grant_type","redirect_uri","client_id","response","fetch","method","headers","body","data","json","ok","userInfo","fetchUserInfo","access_token","token","refreshToken","refresh_token","expiresIn","expires_in","username","userId","id","accessToken","endpoint","Authorization","items","snippet","title","full_name","name","connectPlatform","Promise","resolve","reject","authUrl","append","openURL","disconnectPlatform","credentials","platforms","updatedPlatforms","result","updateCredentials","storePlatformConnection","connectionData"],"sourceRoot":"..\\..\\..\\src","sources":["services/oauthService.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA;;AAUA;AACA,MAAMG,aAA0C,GAAG;EACjDC,SAAS,EAAE;IACTC,QAAQ,EAAE,0BAA0B;IAAE;IACtCC,WAAW,EAAE,+BAA+B;IAC5CC,KAAK,EAAE,yBAAyB;IAChCC,qBAAqB,EAAE,2CAA2C;IAClEC,aAAa,EAAE,8CAA8C;IAC7DC,YAAY,EAAE;EAChB,C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B,GAAG;MAAE,GAAGF,WAAW,CAACC;IAAU,CAAC;IACrD,OAAOC,gBAAgB,CAACvD,QAAQ,CAAkC;;IAElE;IACA,MAAMwD,MAAM,GAAG,MAAM,IAAAC,gCAAiB,EAAC;MACrCH,SAAS,EAAEC;IACb,CAAC,CAAC;IAEF,OAAOC,MAAM;EACf,CAAC,CAAC,OAAOhD,KAAK,EAAE;IACdI,OAAO,CAACJ,KAAK,CAAC,iCAAiCR,QAAQ,IAAI,EAAEQ,KAAK,CAAC;IACnE,OAAO,KAAK;EACd;AACF,CAAC;;AAED;AACA;AACA;AAFApB,OAAA,CAAAgE,kBAAA,GAAAA,kBAAA;AAGO,MAAMM,uBAAuB,GAAG,MAAAA,CACrC1D,QAAgB,EAChB2D,cAAmB,EACnBN,WAA+B,KACV;EACrB,IAAI;IACF;IACA,MAAME,gBAAgB,GAAG;MACvB,GAAGF,WAAW,CAACC,SAAS;MACxB,CAACtD,QAAQ,GAAG;QACV6B,KAAK,EAAE8B,cAAc,CAAC9B,KAAK;QAC3BK,QAAQ,EAAEyB,cAAc,CAACzB,QAAQ;QACjCC,MAAM,EAAEwB,cAAc,CAACxB;MACzB;IACF,CAAC;;IAED;IACA,MAAMqB,MAAM,GAAG,MAAM,IAAAC,gCAAiB,EAAC;MACrCH,SAAS,EAAEC;IACb,CAAC,CAAC;IAEF,OAAOC,MAAM;EACf,CAAC,CAAC,OAAOhD,KAAK,EAAE;IACdI,OAAO,CAACJ,KAAK,CAAC,sCAAsCR,QAAQ,IAAI,EAAEQ,KAAK,CAAC;IACxE,OAAO,KAAK;EACd;AACF,CAAC;AAACpB,OAAA,CAAAsE,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["types/declarations.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["types/index.ts"],"mappings":"","ignoreList":[]}
|