@intra-mart/smartlime 2.0.0-dev.20241121 → 2.0.0-dev.20241125
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import * as SecureStore from 'expo-secure-store';
|
|
3
2
|
import { Prompt } from 'expo-auth-session';
|
|
3
|
+
import * as SecureStore from 'expo-secure-store';
|
|
4
4
|
import { Context as DefaultContext } from './Context';
|
|
5
5
|
export type TokenState = {
|
|
6
6
|
baseUrl: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as SecureStore from 'expo-secure-store';
|
|
2
1
|
import { exchangeCodeAsync, loadAsync, Prompt, refreshAsync, } from 'expo-auth-session';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { useRenderTarget } from '../../_shared/renderTarget';
|
|
2
|
+
import * as SecureStore from 'expo-secure-store';
|
|
3
|
+
import * as WebBrowser from 'expo-web-browser';
|
|
4
|
+
import { useCallback, useEffect, useMemo, useRef, } from 'react';
|
|
7
5
|
import { useIMBaseUrl } from '../..';
|
|
6
|
+
import { useRenderTarget } from '../../_shared/renderTarget';
|
|
8
7
|
import { join } from '../../utils/path';
|
|
9
|
-
import
|
|
8
|
+
import { Context as DefaultContext, } from './Context';
|
|
9
|
+
import { IMOAuthError } from './IMOAuthError';
|
|
10
10
|
WebBrowser.maybeCompleteAuthSession();
|
|
11
11
|
const SUCCESS = 'success';
|
|
12
12
|
const EXCEPTION = 'exception';
|
|
@@ -195,7 +195,7 @@ const useRefresh = (storeConfig, refreshTokenRef, expirationDateRef, requestConf
|
|
|
195
195
|
};
|
|
196
196
|
const useStartAuth = (storeConfig, remainingTimeToRunRefresh, refreshTokenRef, expirationDateRef, requestConfig, discovery, setToken, refresh, setAuthState, authErrorRenderTarget) => {
|
|
197
197
|
const currentBaseUrl = useIMBaseUrl();
|
|
198
|
-
|
|
198
|
+
useEffect(() => {
|
|
199
199
|
(async () => {
|
|
200
200
|
try {
|
|
201
201
|
const tokenState = await getTokenStorage(storeConfig);
|