@bmc-soft/keycloak-auth 1.0.0 → 1.0.2

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.
Files changed (301) hide show
  1. package/dist/_lib/escapeForInjectedJS.d.ts +2 -0
  2. package/dist/_lib/escapeForInjectedJS.d.ts.map +1 -0
  3. package/dist/_lib/escapeForInjectedJS.js +8 -0
  4. package/dist/_lib/escapeForInjectedJS.js.map +1 -0
  5. package/dist/_lib/getInjectedJSForDetect.d.ts +2 -0
  6. package/dist/_lib/getInjectedJSForDetect.d.ts.map +1 -0
  7. package/dist/_lib/getInjectedJSForDetect.js +27 -0
  8. package/dist/_lib/getInjectedJSForDetect.js.map +1 -0
  9. package/dist/_lib/getInjectedJSForLogin.d.ts +2 -0
  10. package/dist/_lib/getInjectedJSForLogin.d.ts.map +1 -0
  11. package/dist/_lib/getInjectedJSForLogin.js +168 -0
  12. package/dist/_lib/getInjectedJSForLogin.js.map +1 -0
  13. package/dist/_lib/getInjectedJSForLogout.d.ts +2 -0
  14. package/dist/_lib/getInjectedJSForLogout.d.ts.map +1 -0
  15. package/dist/_lib/getInjectedJSForLogout.js +63 -0
  16. package/dist/_lib/getInjectedJSForLogout.js.map +1 -0
  17. package/dist/_lib/index.d.ts +7 -0
  18. package/dist/_lib/index.d.ts.map +1 -0
  19. package/dist/_lib/index.js +7 -0
  20. package/dist/_lib/index.js.map +1 -0
  21. package/dist/_lib/types/authStage.d.ts +7 -0
  22. package/dist/_lib/types/authStage.d.ts.map +1 -0
  23. package/dist/_lib/types/authStage.js +6 -0
  24. package/dist/_lib/types/authStage.js.map +1 -0
  25. package/dist/_lib/types/confirmAuthPhase.d.ts +7 -0
  26. package/dist/_lib/types/confirmAuthPhase.d.ts.map +1 -0
  27. package/dist/_lib/types/confirmAuthPhase.js +6 -0
  28. package/dist/_lib/types/confirmAuthPhase.js.map +1 -0
  29. package/dist/_lib/types/index.d.ts +4 -0
  30. package/dist/_lib/types/index.d.ts.map +1 -0
  31. package/dist/_lib/types/index.js +4 -0
  32. package/dist/_lib/types/index.js.map +1 -0
  33. package/dist/_lib/types/pinSetupStage.d.ts +7 -0
  34. package/dist/_lib/types/pinSetupStage.d.ts.map +1 -0
  35. package/dist/_lib/types/pinSetupStage.js +6 -0
  36. package/dist/_lib/types/pinSetupStage.js.map +1 -0
  37. package/dist/axios/adapters/KeycloakTokenProvider.d.ts +10 -0
  38. package/dist/axios/adapters/KeycloakTokenProvider.d.ts.map +1 -0
  39. package/dist/axios/adapters/KeycloakTokenProvider.js +56 -0
  40. package/dist/axios/adapters/KeycloakTokenProvider.js.map +1 -0
  41. package/dist/axios/index.d.ts +5 -0
  42. package/dist/axios/index.d.ts.map +1 -0
  43. package/dist/axios/index.js +3 -0
  44. package/dist/axios/index.js.map +1 -0
  45. package/dist/axios/interceptors.d.ts +5 -0
  46. package/dist/axios/interceptors.d.ts.map +1 -0
  47. package/dist/axios/interceptors.js +136 -0
  48. package/dist/axios/interceptors.js.map +1 -0
  49. package/dist/axios/tokenProvider.d.ts +7 -0
  50. package/dist/axios/tokenProvider.d.ts.map +1 -0
  51. package/dist/axios/tokenProvider.js +2 -0
  52. package/dist/axios/tokenProvider.js.map +1 -0
  53. package/dist/axios/types.d.ts +17 -0
  54. package/dist/axios/types.d.ts.map +1 -0
  55. package/dist/axios/types.js +2 -0
  56. package/dist/axios/types.js.map +1 -0
  57. package/dist/context/KeycloakConfigContext.d.ts +10 -0
  58. package/dist/context/KeycloakConfigContext.d.ts.map +1 -0
  59. package/dist/context/KeycloakConfigContext.js +50 -0
  60. package/dist/context/KeycloakConfigContext.js.map +1 -0
  61. package/dist/context/KeycloakInstanceContext.d.ts +20 -0
  62. package/dist/context/KeycloakInstanceContext.d.ts.map +1 -0
  63. package/dist/context/KeycloakInstanceContext.js +113 -0
  64. package/dist/context/KeycloakInstanceContext.js.map +1 -0
  65. package/dist/context/KeycloakProvider.d.ts +15 -0
  66. package/dist/context/KeycloakProvider.d.ts.map +1 -0
  67. package/dist/context/KeycloakProvider.js +19 -0
  68. package/dist/context/KeycloakProvider.js.map +1 -0
  69. package/dist/context/KeycloakThemeContext.d.ts +66 -0
  70. package/dist/context/KeycloakThemeContext.d.ts.map +1 -0
  71. package/dist/context/KeycloakThemeContext.js +59 -0
  72. package/dist/context/KeycloakThemeContext.js.map +1 -0
  73. package/dist/context/ReauthContext.d.ts +13 -0
  74. package/dist/context/ReauthContext.d.ts.map +1 -0
  75. package/dist/context/ReauthContext.js +26 -0
  76. package/dist/context/ReauthContext.js.map +1 -0
  77. package/dist/context/TokenContext.d.ts +18 -0
  78. package/dist/context/TokenContext.d.ts.map +1 -0
  79. package/dist/context/TokenContext.js +117 -0
  80. package/dist/context/TokenContext.js.map +1 -0
  81. package/dist/context/index.d.ts +14 -0
  82. package/dist/context/index.d.ts.map +1 -0
  83. package/dist/context/index.js +7 -0
  84. package/dist/context/index.js.map +1 -0
  85. package/dist/core/adapter.d.ts +23 -0
  86. package/dist/core/adapter.d.ts.map +1 -0
  87. package/dist/core/adapter.js +75 -0
  88. package/dist/core/adapter.js.map +1 -0
  89. package/dist/core/client.d.ts +7 -0
  90. package/dist/core/client.d.ts.map +1 -0
  91. package/dist/core/client.js +12 -0
  92. package/dist/core/client.js.map +1 -0
  93. package/dist/core/index.d.ts +5 -0
  94. package/dist/core/index.d.ts.map +1 -0
  95. package/dist/core/index.js +4 -0
  96. package/dist/core/index.js.map +1 -0
  97. package/dist/core/storage.d.ts +10 -0
  98. package/dist/core/storage.d.ts.map +1 -0
  99. package/dist/core/storage.js +37 -0
  100. package/dist/core/storage.js.map +1 -0
  101. package/dist/core/types.d.ts +31 -0
  102. package/dist/core/types.d.ts.map +1 -0
  103. package/dist/core/types.js +2 -0
  104. package/dist/core/types.js.map +1 -0
  105. package/dist/core/utils.d.ts +2 -0
  106. package/dist/core/utils.d.ts.map +1 -0
  107. package/dist/core/utils.js +10 -0
  108. package/dist/core/utils.js.map +1 -0
  109. package/dist/hooks/index.d.ts +9 -0
  110. package/dist/hooks/index.d.ts.map +1 -0
  111. package/dist/hooks/index.js +7 -0
  112. package/dist/hooks/index.js.map +1 -0
  113. package/dist/hooks/useKeycloakAuth.d.ts +23 -0
  114. package/dist/hooks/useKeycloakAuth.d.ts.map +1 -0
  115. package/dist/hooks/useKeycloakAuth.js +67 -0
  116. package/dist/hooks/useKeycloakAuth.js.map +1 -0
  117. package/dist/hooks/useKeycloakAuthScreen.d.ts +11 -0
  118. package/dist/hooks/useKeycloakAuthScreen.d.ts.map +1 -0
  119. package/dist/hooks/useKeycloakAuthScreen.js +59 -0
  120. package/dist/hooks/useKeycloakAuthScreen.js.map +1 -0
  121. package/dist/index.d.ts +18 -0
  122. package/dist/index.d.ts.map +1 -0
  123. package/dist/index.js +12 -0
  124. package/dist/index.js.map +1 -0
  125. package/dist/screens/AuthPage/AuthPage.d.ts +17 -0
  126. package/dist/screens/AuthPage/AuthPage.d.ts.map +1 -0
  127. package/dist/screens/AuthPage/AuthPage.js +115 -0
  128. package/dist/screens/AuthPage/AuthPage.js.map +1 -0
  129. package/dist/screens/AuthPage/index.d.ts +2 -0
  130. package/dist/screens/AuthPage/index.d.ts.map +1 -0
  131. package/dist/screens/AuthPage/index.js +2 -0
  132. package/dist/screens/AuthPage/index.js.map +1 -0
  133. package/dist/screens/ConfirmAuthPage/ConfirmAuthPage.d.ts +21 -0
  134. package/dist/screens/ConfirmAuthPage/ConfirmAuthPage.d.ts.map +1 -0
  135. package/dist/screens/ConfirmAuthPage/ConfirmAuthPage.js +215 -0
  136. package/dist/screens/ConfirmAuthPage/ConfirmAuthPage.js.map +1 -0
  137. package/dist/screens/ConfirmAuthPage/index.d.ts +2 -0
  138. package/dist/screens/ConfirmAuthPage/index.d.ts.map +1 -0
  139. package/dist/screens/ConfirmAuthPage/index.js +2 -0
  140. package/dist/screens/ConfirmAuthPage/index.js.map +1 -0
  141. package/dist/screens/index.d.ts +3 -0
  142. package/dist/screens/index.d.ts.map +1 -0
  143. package/dist/screens/index.js +3 -0
  144. package/dist/screens/index.js.map +1 -0
  145. package/dist/storage/credentialStorage.d.ts +26 -0
  146. package/dist/storage/credentialStorage.d.ts.map +1 -0
  147. package/dist/storage/credentialStorage.js +188 -0
  148. package/dist/storage/credentialStorage.js.map +1 -0
  149. package/dist/storage/index.d.ts +3 -0
  150. package/dist/storage/index.d.ts.map +1 -0
  151. package/dist/storage/index.js +3 -0
  152. package/dist/storage/index.js.map +1 -0
  153. package/dist/storage/tokenStorage.d.ts +28 -0
  154. package/dist/storage/tokenStorage.d.ts.map +1 -0
  155. package/dist/storage/tokenStorage.js +145 -0
  156. package/dist/storage/tokenStorage.js.map +1 -0
  157. package/dist/ui/DefaultButton/DefaultButton.d.ts +10 -0
  158. package/dist/ui/DefaultButton/DefaultButton.d.ts.map +1 -0
  159. package/dist/ui/DefaultButton/DefaultButton.js +41 -0
  160. package/dist/ui/DefaultButton/DefaultButton.js.map +1 -0
  161. package/dist/ui/DefaultButton/DefaultIconButton.d.ts +4 -0
  162. package/dist/ui/DefaultButton/DefaultIconButton.d.ts.map +1 -0
  163. package/dist/ui/DefaultButton/DefaultIconButton.js +11 -0
  164. package/dist/ui/DefaultButton/DefaultIconButton.js.map +1 -0
  165. package/dist/ui/DefaultButton/index.d.ts +4 -0
  166. package/dist/ui/DefaultButton/index.d.ts.map +1 -0
  167. package/dist/ui/DefaultButton/index.js +3 -0
  168. package/dist/ui/DefaultButton/index.js.map +1 -0
  169. package/dist/ui/DefaultLoader/DefaultLoader.d.ts +3 -0
  170. package/dist/ui/DefaultLoader/DefaultLoader.d.ts.map +1 -0
  171. package/dist/ui/DefaultLoader/DefaultLoader.js +16 -0
  172. package/dist/ui/DefaultLoader/DefaultLoader.js.map +1 -0
  173. package/dist/ui/DefaultLoader/index.d.ts +2 -0
  174. package/dist/ui/DefaultLoader/index.d.ts.map +1 -0
  175. package/dist/ui/DefaultLoader/index.js +2 -0
  176. package/dist/ui/DefaultLoader/index.js.map +1 -0
  177. package/dist/ui/LogoutButton/LogoutButtonIcon.d.ts +4 -0
  178. package/dist/ui/LogoutButton/LogoutButtonIcon.d.ts.map +1 -0
  179. package/dist/ui/LogoutButton/LogoutButtonIcon.js +12 -0
  180. package/dist/ui/LogoutButton/LogoutButtonIcon.js.map +1 -0
  181. package/dist/ui/LogoutButton/LogoutButtonText.d.ts +4 -0
  182. package/dist/ui/LogoutButton/LogoutButtonText.d.ts.map +1 -0
  183. package/dist/ui/LogoutButton/LogoutButtonText.js +18 -0
  184. package/dist/ui/LogoutButton/LogoutButtonText.js.map +1 -0
  185. package/dist/ui/LogoutButton/index.d.ts +4 -0
  186. package/dist/ui/LogoutButton/index.d.ts.map +1 -0
  187. package/dist/ui/LogoutButton/index.js +3 -0
  188. package/dist/ui/LogoutButton/index.js.map +1 -0
  189. package/dist/ui/LogoutButton/types.d.ts +14 -0
  190. package/dist/ui/LogoutButton/types.d.ts.map +1 -0
  191. package/dist/ui/LogoutButton/types.js +2 -0
  192. package/dist/ui/LogoutButton/types.js.map +1 -0
  193. package/dist/ui/LogoutButton/useLogoutButton.d.ts +13 -0
  194. package/dist/ui/LogoutButton/useLogoutButton.d.ts.map +1 -0
  195. package/dist/ui/LogoutButton/useLogoutButton.js +46 -0
  196. package/dist/ui/LogoutButton/useLogoutButton.js.map +1 -0
  197. package/dist/ui/LogoutConfirmSheet/LogoutConfirmSheet.d.ts +15 -0
  198. package/dist/ui/LogoutConfirmSheet/LogoutConfirmSheet.d.ts.map +1 -0
  199. package/dist/ui/LogoutConfirmSheet/LogoutConfirmSheet.js +68 -0
  200. package/dist/ui/LogoutConfirmSheet/LogoutConfirmSheet.js.map +1 -0
  201. package/dist/ui/LogoutConfirmSheet/index.d.ts +2 -0
  202. package/dist/ui/LogoutConfirmSheet/index.d.ts.map +1 -0
  203. package/dist/ui/LogoutConfirmSheet/index.js +2 -0
  204. package/dist/ui/LogoutConfirmSheet/index.js.map +1 -0
  205. package/dist/ui/NumberPad/NumberPad.d.ts +15 -0
  206. package/dist/ui/NumberPad/NumberPad.d.ts.map +1 -0
  207. package/dist/ui/NumberPad/NumberPad.js +142 -0
  208. package/dist/ui/NumberPad/NumberPad.js.map +1 -0
  209. package/dist/ui/NumberPad/index.d.ts +2 -0
  210. package/dist/ui/NumberPad/index.d.ts.map +1 -0
  211. package/dist/ui/NumberPad/index.js +2 -0
  212. package/dist/ui/NumberPad/index.js.map +1 -0
  213. package/dist/ui/PINConfirm/PINConfirm.d.ts +18 -0
  214. package/dist/ui/PINConfirm/PINConfirm.d.ts.map +1 -0
  215. package/dist/ui/PINConfirm/PINConfirm.js +148 -0
  216. package/dist/ui/PINConfirm/PINConfirm.js.map +1 -0
  217. package/dist/ui/PINConfirm/index.d.ts +2 -0
  218. package/dist/ui/PINConfirm/index.d.ts.map +1 -0
  219. package/dist/ui/PINConfirm/index.js +2 -0
  220. package/dist/ui/PINConfirm/index.js.map +1 -0
  221. package/dist/ui/PINIndicator/PINIndicator.d.ts +13 -0
  222. package/dist/ui/PINIndicator/PINIndicator.d.ts.map +1 -0
  223. package/dist/ui/PINIndicator/PINIndicator.js +52 -0
  224. package/dist/ui/PINIndicator/PINIndicator.js.map +1 -0
  225. package/dist/ui/PINIndicator/index.d.ts +2 -0
  226. package/dist/ui/PINIndicator/index.d.ts.map +1 -0
  227. package/dist/ui/PINIndicator/index.js +2 -0
  228. package/dist/ui/PINIndicator/index.js.map +1 -0
  229. package/dist/ui/PINSetup/PINSetup.d.ts +17 -0
  230. package/dist/ui/PINSetup/PINSetup.d.ts.map +1 -0
  231. package/dist/ui/PINSetup/PINSetup.js +117 -0
  232. package/dist/ui/PINSetup/PINSetup.js.map +1 -0
  233. package/dist/ui/PINSetup/index.d.ts +2 -0
  234. package/dist/ui/PINSetup/index.d.ts.map +1 -0
  235. package/dist/ui/PINSetup/index.js +2 -0
  236. package/dist/ui/PINSetup/index.js.map +1 -0
  237. package/dist/ui/PINSetup/stages/BiometryStage.d.ts +12 -0
  238. package/dist/ui/PINSetup/stages/BiometryStage.d.ts.map +1 -0
  239. package/dist/ui/PINSetup/stages/BiometryStage.js +76 -0
  240. package/dist/ui/PINSetup/stages/BiometryStage.js.map +1 -0
  241. package/dist/ui/PINSetup/stages/ConfirmStage.d.ts +13 -0
  242. package/dist/ui/PINSetup/stages/ConfirmStage.d.ts.map +1 -0
  243. package/dist/ui/PINSetup/stages/ConfirmStage.js +20 -0
  244. package/dist/ui/PINSetup/stages/ConfirmStage.js.map +1 -0
  245. package/dist/ui/PINSetup/stages/EnterStage.d.ts +13 -0
  246. package/dist/ui/PINSetup/stages/EnterStage.d.ts.map +1 -0
  247. package/dist/ui/PINSetup/stages/EnterStage.js +19 -0
  248. package/dist/ui/PINSetup/stages/EnterStage.js.map +1 -0
  249. package/dist/ui/PINSetup/stages/index.d.ts +4 -0
  250. package/dist/ui/PINSetup/stages/index.d.ts.map +1 -0
  251. package/dist/ui/PINSetup/stages/index.js +4 -0
  252. package/dist/ui/PINSetup/stages/index.js.map +1 -0
  253. package/dist/ui/PINSetup/styles.d.ts +39 -0
  254. package/dist/ui/PINSetup/styles.d.ts.map +1 -0
  255. package/dist/ui/PINSetup/styles.js +40 -0
  256. package/dist/ui/PINSetup/styles.js.map +1 -0
  257. package/dist/ui/WebViewLogin/WebViewLogin.d.ts +14 -0
  258. package/dist/ui/WebViewLogin/WebViewLogin.d.ts.map +1 -0
  259. package/dist/ui/WebViewLogin/WebViewLogin.js +125 -0
  260. package/dist/ui/WebViewLogin/WebViewLogin.js.map +1 -0
  261. package/dist/ui/WebViewLogin/index.d.ts +2 -0
  262. package/dist/ui/WebViewLogin/index.d.ts.map +1 -0
  263. package/dist/ui/WebViewLogin/index.js +2 -0
  264. package/dist/ui/WebViewLogin/index.js.map +1 -0
  265. package/dist/ui/WebViewLogout/WebViewLogout.d.ts +11 -0
  266. package/dist/ui/WebViewLogout/WebViewLogout.d.ts.map +1 -0
  267. package/dist/ui/WebViewLogout/WebViewLogout.js +96 -0
  268. package/dist/ui/WebViewLogout/WebViewLogout.js.map +1 -0
  269. package/dist/ui/WebViewLogout/index.d.ts +2 -0
  270. package/dist/ui/WebViewLogout/index.d.ts.map +1 -0
  271. package/dist/ui/WebViewLogout/index.js +2 -0
  272. package/dist/ui/WebViewLogout/index.js.map +1 -0
  273. package/dist/ui/icons/FaceIdIcon.d.ts +4 -0
  274. package/dist/ui/icons/FaceIdIcon.d.ts.map +1 -0
  275. package/dist/ui/icons/FaceIdIcon.js +7 -0
  276. package/dist/ui/icons/FaceIdIcon.js.map +1 -0
  277. package/dist/ui/icons/FingerprintIcon.d.ts +4 -0
  278. package/dist/ui/icons/FingerprintIcon.d.ts.map +1 -0
  279. package/dist/ui/icons/FingerprintIcon.js +10 -0
  280. package/dist/ui/icons/FingerprintIcon.js.map +1 -0
  281. package/dist/ui/icons/index.d.ts +3 -0
  282. package/dist/ui/icons/index.d.ts.map +1 -0
  283. package/dist/ui/icons/index.js +3 -0
  284. package/dist/ui/icons/index.js.map +1 -0
  285. package/dist/ui/index.d.ts +11 -0
  286. package/dist/ui/index.d.ts.map +1 -0
  287. package/dist/ui/index.js +11 -0
  288. package/dist/ui/index.js.map +1 -0
  289. package/dist/widgets/ReauthBottomSheet/ReauthBottomSheet.d.ts +17 -0
  290. package/dist/widgets/ReauthBottomSheet/ReauthBottomSheet.d.ts.map +1 -0
  291. package/dist/widgets/ReauthBottomSheet/ReauthBottomSheet.js +48 -0
  292. package/dist/widgets/ReauthBottomSheet/ReauthBottomSheet.js.map +1 -0
  293. package/dist/widgets/ReauthBottomSheet/index.d.ts +2 -0
  294. package/dist/widgets/ReauthBottomSheet/index.d.ts.map +1 -0
  295. package/dist/widgets/ReauthBottomSheet/index.js +2 -0
  296. package/dist/widgets/ReauthBottomSheet/index.js.map +1 -0
  297. package/dist/widgets/index.d.ts +2 -0
  298. package/dist/widgets/index.d.ts.map +1 -0
  299. package/dist/widgets/index.js +2 -0
  300. package/dist/widgets/index.js.map +1 -0
  301. package/package.json +5 -4
@@ -0,0 +1,125 @@
1
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
2
+ import { Linking, Platform, StyleSheet, View } from 'react-native';
3
+ import WebView from 'react-native-webview';
4
+ import { useKeycloakTheme } from '../../context/KeycloakThemeContext';
5
+ import { useKeycloakAuth, useKeycloakInstance } from '../../hooks';
6
+ export const WebViewLogin = ({ onLoginSuccess, style, paddingTop = 16, paddingBottom = 16, }) => {
7
+ const { colors: { background: backgroundColor }, LoaderComponent, } = useKeycloakTheme();
8
+ const [user, setUser] = useState({ username: '', password: '' });
9
+ const [loading, setLoading] = useState(true);
10
+ const [loginUrl, setLoginUrl] = useState('');
11
+ const webViewRef = useRef(null);
12
+ const { redirectUri } = useKeycloakInstance();
13
+ const { createLoginUrl } = useKeycloakAuth();
14
+ useEffect(() => {
15
+ const url = createLoginUrl();
16
+ setLoginUrl(url);
17
+ }, [createLoginUrl]);
18
+ useEffect(() => {
19
+ if (Platform.OS === 'ios') {
20
+ const handleDeepLink = (event) => {
21
+ if (event.url.startsWith(redirectUri)) {
22
+ onLoginSuccess?.({
23
+ ...user,
24
+ url: event.url,
25
+ });
26
+ }
27
+ };
28
+ Linking.getInitialURL().then(initialUrl => {
29
+ if (initialUrl && initialUrl.startsWith(redirectUri)) {
30
+ handleDeepLink({ url: initialUrl });
31
+ }
32
+ });
33
+ const subscription = Linking.addEventListener('url', handleDeepLink);
34
+ return () => {
35
+ subscription.remove();
36
+ };
37
+ }
38
+ return undefined;
39
+ }, [user, onLoginSuccess, redirectUri]);
40
+ const handleMessage = useCallback((event) => {
41
+ try {
42
+ const messageData = JSON.parse(event.nativeEvent.data);
43
+ if (messageData.username && messageData.password) {
44
+ setUser({
45
+ username: messageData.username,
46
+ password: messageData.password,
47
+ });
48
+ }
49
+ }
50
+ catch (error) {
51
+ console.error('[WebViewLogin] Ошибка обработки сообщения:', error);
52
+ }
53
+ }, []);
54
+ const handleNavigationStateChange = useCallback((event) => {
55
+ if (Platform.OS === 'android' && event.url.startsWith(redirectUri)) {
56
+ onLoginSuccess?.({
57
+ ...user,
58
+ url: event.url,
59
+ });
60
+ }
61
+ }, [user, onLoginSuccess, redirectUri]);
62
+ const defaultInjectedJS = `
63
+ (function() {
64
+ // Отключаем автозаполнение
65
+ var inputs = document.querySelectorAll('input[type="password"], input[type="text"]');
66
+ for (var i = 0; i < inputs.length; i++) {
67
+ inputs[i].setAttribute('autocomplete', 'off');
68
+ inputs[i].setAttribute('autocorrect', 'off');
69
+ inputs[i].setAttribute('autocapitalize', 'none');
70
+ }
71
+
72
+ // Настраиваем viewport
73
+ var meta = document.createElement('meta');
74
+ meta.setAttribute('name', 'viewport');
75
+ meta.setAttribute('content', 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no');
76
+ document.getElementsByTagName('head')[0].appendChild(meta);
77
+
78
+ // Извлекаем credentials при submit
79
+ var form = document.querySelector('form');
80
+ if (form) {
81
+ form.addEventListener('submit', function() {
82
+ var usernameField = document.querySelector('input[name="username"]');
83
+ var passwordField = document.querySelector('input[name="password"]');
84
+ var username = usernameField ? usernameField.value : '';
85
+ var password = passwordField ? passwordField.value : '';
86
+ window.ReactNativeWebView.postMessage(JSON.stringify({
87
+ username: username,
88
+ password: password
89
+ }));
90
+ });
91
+ }
92
+ })();
93
+ true;
94
+ `;
95
+ return (<View style={[styles.container, style]}>
96
+ <View style={[
97
+ styles.flex,
98
+ {
99
+ paddingTop,
100
+ paddingBottom,
101
+ },
102
+ ]}>
103
+
104
+ <WebView ref={webViewRef} source={{ uri: loginUrl }} onLoadEnd={() => setLoading(false)} onError={() => setLoading(false)} onNavigationStateChange={Platform.OS === 'android' ? handleNavigationStateChange : undefined} onMessage={handleMessage} javaScriptEnabled={true} injectedJavaScript={defaultInjectedJS} incognito={true} style={[styles.flex, { backgroundColor }]}/>
105
+
106
+ {loading || !loginUrl ? (<View style={[StyleSheet.absoluteFillObject, { backgroundColor }]}>
107
+ <LoaderComponent />
108
+ </View>) : null}
109
+ </View>
110
+ </View>);
111
+ };
112
+ const styles = StyleSheet.create({
113
+ container: {
114
+ flex: 1,
115
+ },
116
+ flex: {
117
+ flex: 1,
118
+ },
119
+ loadingContainer: {
120
+ flex: 1,
121
+ justifyContent: 'center',
122
+ alignItems: 'center',
123
+ },
124
+ });
125
+ //# sourceMappingURL=WebViewLogin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebViewLogin.js","sourceRoot":"","sources":["../../../src/ui/WebViewLogin/WebViewLogin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtE,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AACjE,OAAO,OAA8B,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAC,gBAAgB,EAAC,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAC,eAAe,EAAE,mBAAmB,EAAC,MAAM,aAAa,CAAC;AA2CjE,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EACxD,cAAc,EACd,KAAK,EACL,UAAU,GAAG,EAAE,EACf,aAAa,GAAG,EAAE,GACnB,EAAE,EAAE;IACH,MAAM,EACJ,MAAM,EAAE,EAAC,UAAU,EAAE,eAAe,EAAC,EACrC,eAAe,GAChB,GAAG,gBAAgB,EAAE,CAAC;IACvB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,EAAC,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAC,CAAC,CAAC;IAC/D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAG,MAAM,CAAU,IAAI,CAAC,CAAC;IAEzC,MAAM,EAAC,WAAW,EAAC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AAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CACjC,uBAAuB,CAAC,CACtB,QAAQ,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,SAC5D,CAAC,CACD,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,iBAAiB,CAAC,CAAC,IAAI,CAAC,CACxB,kBAAkB,CAAC,CAAC,iBAAiB,CAAC,CACtC,SAAS,CAAC,CAAC,IAAI,CAAC,CAChB,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,EAAC,eAAe,EAAC,CAAC,CAAC,EAG1C;;QAAA,CAAC,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CACtB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,kBAAkB,EAAE,EAAC,eAAe,EAAC,CAAC,CAAC,CAC9D;YAAA,CAAC,eAAe,CAAC,AAAD,EAClB;UAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;KACR;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { WebViewLogin } from './WebViewLogin';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/WebViewLogin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { WebViewLogin } from './WebViewLogin';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/WebViewLogin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface WebViewLogoutProps {
3
+ onLogoutSuccess?: () => void;
4
+ onError?: (error: Error) => void;
5
+ style?: any;
6
+ paddingTop?: number;
7
+ paddingBottom?: number;
8
+ }
9
+ export declare const WebViewLogout: React.FC<WebViewLogoutProps>;
10
+ export {};
11
+ //# sourceMappingURL=WebViewLogout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebViewLogout.d.ts","sourceRoot":"","sources":["../../../src/ui/WebViewLogout/WebViewLogout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAStE,UAAU,kBAAkB;IAI1B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAK7B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAKjC,KAAK,CAAC,EAAE,GAAG,CAAC;IAKZ,UAAU,CAAC,EAAE,MAAM,CAAC;IAKpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAuBD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiHtD,CAAC"}
@@ -0,0 +1,96 @@
1
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
2
+ import { StyleSheet, View } from 'react-native';
3
+ import WebView from 'react-native-webview';
4
+ import { getInjectedJSForLogout } from '../../_lib';
5
+ import { useKeycloakConfigRefresh, useKeycloakInstance, useKeycloakTheme } from '../../context';
6
+ import { useKeycloakAuth } from '../../hooks';
7
+ import { credentialStorage, tokenStorage } from '../../storage';
8
+ export const WebViewLogout = ({ onLogoutSuccess, onError, style, paddingTop = 16, paddingBottom = 16, }) => {
9
+ const [logoutUrl, setLogoutUrl] = useState('');
10
+ const completedRef = useRef(false);
11
+ const { colors: { background: backgroundColor }, LoaderComponent, } = useKeycloakTheme();
12
+ const { redirectUri } = useKeycloakInstance();
13
+ const refreshPinCheck = useKeycloakConfigRefresh();
14
+ const { createLogoutUrl } = useKeycloakAuth();
15
+ useEffect(() => {
16
+ try {
17
+ const url = createLogoutUrl();
18
+ setLogoutUrl(url);
19
+ }
20
+ catch (error) {
21
+ console.error('[WebViewLogout] Error creating logout URL:', error);
22
+ onError?.(error);
23
+ }
24
+ }, [createLogoutUrl, onError]);
25
+ const handleLogoutSuccess = useCallback(async () => {
26
+ if (completedRef.current)
27
+ return;
28
+ completedRef.current = true;
29
+ try {
30
+ await tokenStorage.clearTokens();
31
+ await credentialStorage.clearPIN();
32
+ await refreshPinCheck();
33
+ onLogoutSuccess?.();
34
+ }
35
+ catch (error) {
36
+ console.error('[WebViewLogout] Error clearing session:', error);
37
+ onError?.(error);
38
+ }
39
+ }, [onLogoutSuccess, onError, refreshPinCheck]);
40
+ const handleNavigationStateChange = useCallback((event) => {
41
+ if (redirectUri && event.url.startsWith(redirectUri)) {
42
+ handleLogoutSuccess();
43
+ }
44
+ }, [redirectUri, handleLogoutSuccess]);
45
+ const handleMessage = useCallback((event) => {
46
+ try {
47
+ const data = JSON.parse(event.nativeEvent.data);
48
+ switch (data.type) {
49
+ case 'logout_button_clicked':
50
+ setTimeout(() => handleLogoutSuccess(), 1000);
51
+ break;
52
+ case 'button_click_error':
53
+ case 'script_error':
54
+ onError?.(new Error(`[WebViewLogout] ${data.type}: ${data.error ?? ''}`));
55
+ break;
56
+ }
57
+ }
58
+ catch {
59
+ }
60
+ }, [handleLogoutSuccess, onError]);
61
+ const handleWebViewError = useCallback(() => {
62
+ const error = new Error('[WebViewLogout] WebView error occurred');
63
+ console.error(error.message);
64
+ if (onError) {
65
+ onError(error);
66
+ }
67
+ }, [onError]);
68
+ return (<View style={[styles.container, style]}>
69
+ <View style={[
70
+ styles.flex,
71
+ {
72
+ paddingTop,
73
+ paddingBottom,
74
+ },
75
+ ]}>
76
+ <WebView source={{ uri: logoutUrl }} onError={handleWebViewError} onNavigationStateChange={handleNavigationStateChange} onMessage={handleMessage} injectedJavaScript={getInjectedJSForLogout()} javaScriptEnabled={true} scrollEnabled={false} sharedCookiesEnabled={true} cacheEnabled={true} thirdPartyCookiesEnabled={true}/>
77
+ <View style={[StyleSheet.absoluteFillObject, { backgroundColor }]}>
78
+ <LoaderComponent />
79
+ </View>
80
+ </View>
81
+ </View>);
82
+ };
83
+ const styles = StyleSheet.create({
84
+ container: {
85
+ flex: 1,
86
+ },
87
+ flex: {
88
+ flex: 1,
89
+ },
90
+ loadingContainer: {
91
+ flex: 1,
92
+ justifyContent: 'center',
93
+ alignItems: 'center',
94
+ },
95
+ });
96
+ //# sourceMappingURL=WebViewLogout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebViewLogout.js","sourceRoot":"","sources":["../../../src/ui/WebViewLogout/WebViewLogout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtE,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,OAAmC,MAAM,sBAAsB,CAAC;AAEvE,OAAO,EAAC,sBAAsB,EAAC,MAAM,YAAY,CAAC;AAClD,OAAO,EAAC,wBAAwB,EAAE,mBAAmB,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAC,iBAAiB,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAkD9D,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC1D,eAAe,EACf,OAAO,EACP,KAAK,EACL,UAAU,GAAG,EAAE,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Logout } from './WebViewLogout';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/WebViewLogout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { WebViewLogout } from './WebViewLogout';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/WebViewLogout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SvgProps } from 'react-native-svg';
3
+ export declare const FaceIdIcon: React.MemoExoticComponent<(props: SvgProps) => React.JSX.Element>;
4
+ //# sourceMappingURL=FaceIdIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FaceIdIcon.d.ts","sourceRoot":"","sources":["../../../src/ui/icons/FaceIdIcon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAY,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAcrD,eAAO,MAAM,UAAU,oCAZa,QAAQ,uBAYO,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React, { memo } from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ const FaceIdIconComponent = (props) => (<Svg width={48} height={48} fill="none" viewBox="0 0 24 24" {...props}>
4
+ <Path stroke={props.color} strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M7 3H5a2 2 0 0 0-2 2v2M17 3h2a2 2 0 0 1 2 2v2M16 8v2M8 8v2M9 16s1 1 3 1 3-1 3-1M12 8v5h-1M7 21H5a2 2 0 0 1-2-2v-2M17 21h2a2 2 0 0 0 2-2v-2"/>
5
+ </Svg>);
6
+ export const FaceIdIcon = memo(FaceIdIconComponent);
7
+ //# sourceMappingURL=FaceIdIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FaceIdIcon.js","sourceRoot":"","sources":["../../../src/ui/icons/FaceIdIcon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAC,IAAI,EAAC,MAAM,OAAO,CAAC;AAClC,OAAO,GAAG,EAAE,EAAC,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAErD,MAAM,mBAAmB,GAAG,CAAC,KAAe,EAAE,EAAE,CAAC,CAC/C,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,CACpE;IAAA,CAAC,IAAI,CACH,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CACpB,aAAa,CAAC,OAAO,CACrB,cAAc,CAAC,OAAO,CACtB,WAAW,CAAC,CAAC,GAAG,CAAC,CACjB,CAAC,CAAC,4IAA4I,EAElJ;EAAA,EAAE,GAAG,CAAC,CACP,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SvgProps } from 'react-native-svg';
3
+ export declare const FingerprintIcon: React.MemoExoticComponent<(props: SvgProps) => React.JSX.Element>;
4
+ //# sourceMappingURL=FingerprintIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FingerprintIcon.d.ts","sourceRoot":"","sources":["../../../src/ui/icons/FingerprintIcon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAY,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAmCrD,eAAO,MAAM,eAAe,oCAjCa,QAAQ,uBAiCY,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React, { memo } from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ const FingerprintIconComponent = (props) => (<Svg width={24} height={24} viewBox="0 0 24 24" fill="none" {...props}>
4
+ <Path d="M8.10008 21.221C6.71021 19.2375 5.89258 16.8243 5.89258 14.2187C5.89258 10.8443 8.6265 8.10938 11.9989 8.10938C15.3712 8.10938 18.1051 10.8443 18.1051 14.2187" stroke={props.color} strokeWidth={2} strokeLinecap="round" strokeLinejoin="round"/>
5
+ <Path d="M18.4361 20.3118C18.3262 20.3179 18.2182 20.3281 18.1073 20.3281C14.7349 20.3281 12.001 17.5931 12.001 14.2188" stroke={props.color} strokeWidth={2} strokeLinecap="round" strokeLinejoin="round"/>
6
+ <Path d="M13.2694 21.9999C10.675 20.382 8.94705 17.5024 8.94705 14.2187C8.94705 12.5315 10.3145 11.164 12.0007 11.164C13.6869 11.164 15.0543 12.5315 15.0543 14.2187C15.0543 15.9059 16.4218 17.2733 18.108 17.2733C19.7942 17.2733 21.1616 15.9059 21.1616 14.2187C21.1616 9.1571 17.0602 5.05469 12.0017 5.05469C6.94319 5.05469 2.8418 9.1571 2.8418 14.2187C2.8418 15.3469 2.96806 16.4455 3.20021 17.5045" stroke={props.color} strokeWidth={2} strokeLinecap="round" strokeLinejoin="round"/>
7
+ <Path d="M20.5257 5.86313C18.4435 3.4978 15.399 2 12.0002 2C8.60136 2 5.55687 3.4978 3.47461 5.86313" stroke={props.color} strokeWidth={2} strokeLinecap="round" strokeLinejoin="round"/>
8
+ </Svg>);
9
+ export const FingerprintIcon = memo(FingerprintIconComponent);
10
+ //# sourceMappingURL=FingerprintIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FingerprintIcon.js","sourceRoot":"","sources":["../../../src/ui/icons/FingerprintIcon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAC,IAAI,EAAC,MAAM,OAAO,CAAC;AAClC,OAAO,GAAG,EAAE,EAAC,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAErD,MAAM,wBAAwB,GAAG,CAAC,KAAe,EAAE,EAAE,CAAC,CACpD,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CACpE;IAAA,CAAC,IAAI,CACH,CAAC,CAAC,gKAAgK,CAClK,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CACpB,WAAW,CAAC,CAAC,CAAC,CAAC,CACf,aAAa,CAAC,OAAO,CACrB,cAAc,CAAC,OAAO,EAExB;IAAA,CAAC,IAAI,CACH,CAAC,CAAC,gHAAgH,CAClH,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CACpB,WAAW,CAAC,CAAC,CAAC,CAAC,CACf,aAAa,CAAC,OAAO,CACrB,cAAc,CAAC,OAAO,EAExB;IAAA,CAAC,IAAI,CACH,CAAC,CAAC,uYAAuY,CACzY,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CACpB,WAAW,CAAC,CAAC,CAAC,CAAC,CACf,aAAa,CAAC,OAAO,CACrB,cAAc,CAAC,OAAO,EAExB;IAAA,CAAC,IAAI,CACH,CAAC,CAAC,6FAA6F,CAC/F,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CACpB,WAAW,CAAC,CAAC,CAAC,CAAC,CACf,aAAa,CAAC,OAAO,CACrB,cAAc,CAAC,OAAO,EAE1B;EAAA,EAAE,GAAG,CAAC,CACP,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,wBAAwB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { FaceIdIcon } from './FaceIdIcon';
2
+ export { FingerprintIcon } from './FingerprintIcon';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { FaceIdIcon } from './FaceIdIcon';
2
+ export { FingerprintIcon } from './FingerprintIcon';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,11 @@
1
+ export { DefaultContainedButton, DefaultIconButton, DefaultOutlinedButton } from './DefaultButton';
2
+ export { DefaultLoader } from './DefaultLoader';
3
+ export { LogoutConfirmSheet, type LogoutConfirmSheetProps, type LogoutConfirmSheetRef, } from './LogoutConfirmSheet';
4
+ export { LogoutButtonIcon, LogoutButtonText, type LogoutButtonBaseProps, type LogoutButtonIconProps, type LogoutButtonTextProps, } from './LogoutButton';
5
+ export { NumberPad } from './NumberPad';
6
+ export { PINIndicator } from './PINIndicator';
7
+ export { PINConfirm } from './PINConfirm';
8
+ export { PINSetup } from './PINSetup';
9
+ export { WebViewLogin } from './WebViewLogin';
10
+ export { WebViewLogout } from './WebViewLogout';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,sBAAsB,EAAE,iBAAiB,EAAE,qBAAqB,EAAC,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,11 @@
1
+ export { DefaultContainedButton, DefaultIconButton, DefaultOutlinedButton } from './DefaultButton';
2
+ export { DefaultLoader } from './DefaultLoader';
3
+ export { LogoutConfirmSheet, } from './LogoutConfirmSheet';
4
+ export { LogoutButtonIcon, LogoutButtonText, } from './LogoutButton';
5
+ export { NumberPad } from './NumberPad';
6
+ export { PINIndicator } from './PINIndicator';
7
+ export { PINConfirm } from './PINConfirm';
8
+ export { PINSetup } from './PINSetup';
9
+ export { WebViewLogin } from './WebViewLogin';
10
+ export { WebViewLogout } from './WebViewLogout';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,sBAAsB,EAAE,iBAAiB,EAAE,qBAAqB,EAAC,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACL,kBAAkB,GAGnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GAIjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ interface ReauthBottomSheetProps {
3
+ isVisible: boolean;
4
+ onSuccess?: () => void;
5
+ onDismiss?: () => void;
6
+ onError?: (error: Error) => void;
7
+ pinLength?: number;
8
+ allowBiometry?: boolean;
9
+ autoShowBiometry?: boolean;
10
+ title?: string;
11
+ description?: string;
12
+ footer?: React.ReactNode;
13
+ snapPointPercentage?: number;
14
+ }
15
+ export declare const ReauthBottomSheet: React.FC<ReauthBottomSheetProps>;
16
+ export {};
17
+ //# sourceMappingURL=ReauthBottomSheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReauthBottomSheet.d.ts","sourceRoot":"","sources":["../../../src/widgets/ReauthBottomSheet/ReauthBottomSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAS1D,UAAU,sBAAsB;IAI9B,SAAS,EAAE,OAAO,CAAC;IAKnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IAKvB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IAKvB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAMjC,SAAS,CAAC,EAAE,MAAM,CAAC;IAMnB,aAAa,CAAC,EAAE,OAAO,CAAC;IAMxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAM3B,KAAK,CAAC,EAAE,MAAM,CAAC;IAMf,WAAW,CAAC,EAAE,MAAM,CAAC;IAMrB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAMzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAsDD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAmF9D,CAAC"}
@@ -0,0 +1,48 @@
1
+ import BottomSheet, { BottomSheetBackdrop } from '@gorhom/bottom-sheet';
2
+ import React, { useCallback, useMemo, useRef } from 'react';
3
+ import { StyleSheet, View } from 'react-native';
4
+ import { useKeycloakTheme } from '../../context/KeycloakThemeContext';
5
+ import { PINConfirm } from '../../ui/PINConfirm';
6
+ export const ReauthBottomSheet = React.memo(({ isVisible, onSuccess, onDismiss, onError, pinLength = 4, allowBiometry = true, autoShowBiometry = true, title = 'Подтвердите вход', description = 'Введите PIN-код', footer, snapPointPercentage = 50, }) => {
7
+ const { colors: { background, border: borderColor }, } = useKeycloakTheme();
8
+ const bottomSheetRef = useRef(null);
9
+ const snapPoints = useMemo(() => [`${snapPointPercentage}%`], [snapPointPercentage]);
10
+ React.useEffect(() => {
11
+ if (isVisible) {
12
+ bottomSheetRef.current?.snapToIndex(0);
13
+ }
14
+ else {
15
+ bottomSheetRef.current?.close();
16
+ }
17
+ }, [isVisible]);
18
+ const handleSuccess = useCallback(() => {
19
+ bottomSheetRef.current?.close();
20
+ onSuccess?.();
21
+ }, [onSuccess]);
22
+ const handleDismiss = useCallback(() => {
23
+ onDismiss?.();
24
+ }, [onDismiss]);
25
+ const renderBackdrop = useCallback((props) => (<BottomSheetBackdrop {...props} disappearsOnIndex={-1} appearsOnIndex={0} opacity={0.5}/>), []);
26
+ const backgroundStyle = useMemo(() => ({
27
+ backgroundColor: background,
28
+ }), [background]);
29
+ return (<BottomSheet ref={bottomSheetRef} index={-1} snapPoints={snapPoints} enablePanDownToClose onClose={handleDismiss} backdropComponent={renderBackdrop} backgroundStyle={backgroundStyle}>
30
+ <View style={styles.container}>
31
+ <PINConfirm onSuccess={handleSuccess} onError={onError} pinLength={pinLength} allowBiometry={allowBiometry} autoShowBiometry={autoShowBiometry} title={title} description={description}/>
32
+ {footer ? (<View style={[styles.footer, { borderTopColor: borderColor }]}>{footer}</View>) : null}
33
+ </View>
34
+ </BottomSheet>);
35
+ });
36
+ ReauthBottomSheet.displayName = 'ReauthBottomSheet';
37
+ const styles = StyleSheet.create({
38
+ container: {
39
+ flex: 1,
40
+ padding: 16,
41
+ },
42
+ footer: {
43
+ marginTop: 16,
44
+ paddingTop: 16,
45
+ borderTopWidth: 1,
46
+ },
47
+ });
48
+ //# sourceMappingURL=ReauthBottomSheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReauthBottomSheet.js","sourceRoot":"","sources":["../../../src/widgets/ReauthBottomSheet/ReauthBottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,EAAE,EAAC,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,OAAO,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAC,gBAAgB,EAAC,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAyH/C,MAAM,CAAC,MAAM,iBAAiB,GAAqC,KAAK,CAAC,IAAI,CAC3E,CAAC,EACC,SAAS,EACT,SAAS,EACT,SAAS,EACT,OAAO,EACP,SAAS,GAAG,CAAC,EACb,aAAa,GAAG,IAAI,EACpB,gBAAgB,GAAG,IAAI,EACvB,KAAK,GAAG,kBAAkB,EAC1B,WAAW,GAAG,iBAAiB,EAC/B,MAAM,EACN,mBAAmB,GAAG,EAAE,GACzB,EAAE,EAAE;IACH,MAAM,EACJ,MAAM,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAC,GAC1C,GAAG,gBAAgB,EAAE,CAAC;IACvB,MAAM,cAAc,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAEjD,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,mBAAmB,GAAG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C,CAClC,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC;QAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;UAAA,CAAC,UAAU,CACT,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,CACnC,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,WAAW,CAAC,EAE3B;UAAA,CAAC,MAAM,CAAC,CAAC,CAAC,CACR,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,EAAC,cAAc,EAAE,WAAW,EAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAC7E,CAAC,CAAC,CAAC,IAAI,CACV;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,WAAW,CAAC,CACf,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC;AAEpD,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,OAAO,EAAE,EAAE;KACZ;IACD,MAAM,EAAE;QACN,SAAS,EAAE,EAAE;QACb,UAAU,EAAE,EAAE;QACd,cAAc,EAAE,CAAC;KAClB;CACF,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ReauthBottomSheet } from './ReauthBottomSheet';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/widgets/ReauthBottomSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ReauthBottomSheet } from './ReauthBottomSheet';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/widgets/ReauthBottomSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ReauthBottomSheet } from './ReauthBottomSheet';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ReauthBottomSheet } from './ReauthBottomSheet';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/widgets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@bmc-soft/keycloak-auth",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Production-ready Keycloak authentication package for React Native with optimized performance and security",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
7
  "files": [
8
8
  "dist",
9
9
  "README.md",
@@ -42,7 +42,8 @@
42
42
  "scripts": {
43
43
  "build": "tsc",
44
44
  "watch": "tsc --watch",
45
- "clean": "rm -rf dist",
45
+ "clean": "rm -rf dist && rm -f tsconfig.tsbuildinfo",
46
+ "prepack": "npm run build",
46
47
  "prepublishOnly": "npm run clean && npm run build",
47
48
  "typecheck": "tsc --noEmit"
48
49
  },