@olea-bps/base 1.0.1 → 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.
@@ -21,7 +21,6 @@ import * as SecureStore from 'expo-secure-store';
21
21
  import { useTranslation } from 'react-i18next';
22
22
  import { useSelector } from 'react-redux';
23
23
  import { useTheme } from 'react-native-paper';
24
- import notifee, { TriggerType } from '@notifee/react-native';
25
24
  import { DateTime } from 'luxon';
26
25
 
27
26
  /**
@@ -318,59 +317,6 @@ function UserContextProvider({ children }) {
318
317
  [refreshToken, refreshTokenAt, discovery]
319
318
  );
320
319
 
321
- useEffect(
322
- () => {
323
- if (refreshToken && refreshTokenAt && refreshTokenExpiresAt) {
324
- notifee.requestPermission()
325
- .then(
326
- notificationSettings =>
327
- notifee.createChannel({
328
- id: RefreshTokenReqiredNotificationChannelId,
329
- name: t('authentication:notificationChannelName'),
330
- description: t('authentication:notificationChannelDescription'),
331
- lights: true,
332
- sound: 'default',
333
- })
334
- ).then(
335
- channelId => {
336
- const refreshTokenExpiresAtMillisecond = refreshTokenAt * 1000;
337
- const refreshTokenExpiresAtDateTime = DateTime.fromMillis(refreshTokenExpiresAtMillisecond, { locale: language });
338
- const refreshTokenExpiresAtDateLocaleString = refreshTokenExpiresAtDateTime.toLocaleString(DateTime.DATE_SHORT);
339
- const refreshTokenExpiresAtTimeLocaleString = refreshTokenExpiresAtDateTime.toLocaleString(DateTime.TIME_SIMPLE);
340
- return notifee.createTriggerNotification(
341
- {
342
- id: RefreshTokenReqiredNotificationId,
343
- title: t(
344
- 'authentication:tokenInvalidNotification',
345
- {
346
- refreshTokenExpiresAtDate: refreshTokenExpiresAtDateLocaleString,
347
- refreshTokenExpiresAtTime: refreshTokenExpiresAtTimeLocaleString
348
-
349
- }
350
- ),
351
- android: {
352
- channelId: channelId,
353
- showChronometer: true,
354
- chronometerDirection: 'down',
355
- timestamp: refreshTokenExpiresAt * 1000,
356
- smallIcon: RefreshTokenReqiredNotificationIcon,
357
- },
358
- },
359
- {
360
- type: TriggerType.TIMESTAMP,
361
- timestamp: refreshTokenExpiresAtMillisecond,
362
- }
363
- );
364
- }
365
- )
366
- } else {
367
- notifee.cancelDisplayedNotification(RefreshTokenReqiredNotificationId);
368
- notifee.cancelTriggerNotification(RefreshTokenReqiredNotificationId);
369
- }
370
- },
371
- [refreshToken && refreshTokenAt, language, t]
372
- )
373
-
374
320
  function login() {
375
321
  return promptAsync()
376
322
  .then(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olea-bps/base",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "OLEA base library",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -35,9 +35,9 @@
35
35
  "@react-native-firebase/messaging": "^22.2.0",
36
36
  "@react-navigation/drawer": "^7.3.12",
37
37
  "@react-navigation/native": "^7.1.9",
38
- "expo-application": "~7.0.7",
39
- "expo-auth-session": "~7.0.8",
40
- "expo-crypto": "~15.0.7",
38
+ "expo-application": "~7.0.8",
39
+ "expo-auth-session": "~7.0.11",
40
+ "expo-crypto": "~15.0.9",
41
41
  "expo-linear-gradient": "~15.0.7",
42
42
  "expo-web-browser": "~15.0.10",
43
43
  "jwt-decode": "4.0.0",