@asgardeo/react 0.6.27 → 0.6.29
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/cjs/index.js +69 -16
- package/dist/cjs/index.js.map +3 -3
- package/dist/index.js +69 -16
- package/dist/index.js.map +3 -3
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -720,9 +720,7 @@ var AsgardeoReactClient = class extends import_browser6.AsgardeoBrowserClient {
|
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
722
|
async getDecodedIdToken(sessionId) {
|
|
723
|
-
return this.
|
|
724
|
-
return this.asgardeo.getDecodedIdToken(sessionId);
|
|
725
|
-
});
|
|
723
|
+
return this.asgardeo.getDecodedIdToken(sessionId);
|
|
726
724
|
}
|
|
727
725
|
async getUserProfile(options) {
|
|
728
726
|
return this.withLoading(async () => {
|
|
@@ -933,9 +931,7 @@ var AsgardeoReactClient = class extends import_browser6.AsgardeoBrowserClient {
|
|
|
933
931
|
return this.asgardeo.httpRequestAll(requestConfigs);
|
|
934
932
|
}
|
|
935
933
|
async getAccessToken(sessionId) {
|
|
936
|
-
return this.
|
|
937
|
-
return this.asgardeo.getAccessToken(sessionId);
|
|
938
|
-
});
|
|
934
|
+
return this.asgardeo.getAccessToken(sessionId);
|
|
939
935
|
}
|
|
940
936
|
clearSession(sessionId) {
|
|
941
937
|
this.asgardeo.clearSession(sessionId);
|
|
@@ -1897,6 +1893,54 @@ var AsgardeoProvider = ({
|
|
|
1897
1893
|
flattenedProfile: (0, import_browser12.generateFlattenedUserProfile)(payload, prev?.schemas)
|
|
1898
1894
|
}));
|
|
1899
1895
|
};
|
|
1896
|
+
const getDecodedIdToken = (0, import_react15.useCallback)(async () => {
|
|
1897
|
+
return await asgardeo.getDecodedIdToken();
|
|
1898
|
+
}, [asgardeo]);
|
|
1899
|
+
const getAccessToken = (0, import_react15.useCallback)(async () => {
|
|
1900
|
+
return await asgardeo.getAccessToken();
|
|
1901
|
+
}, [asgardeo]);
|
|
1902
|
+
const request = (0, import_react15.useCallback)(
|
|
1903
|
+
async (...args) => {
|
|
1904
|
+
return await asgardeo.request(...args);
|
|
1905
|
+
},
|
|
1906
|
+
[asgardeo]
|
|
1907
|
+
);
|
|
1908
|
+
const requestAll = (0, import_react15.useCallback)(
|
|
1909
|
+
async (...args) => {
|
|
1910
|
+
return await asgardeo.requestAll(...args);
|
|
1911
|
+
},
|
|
1912
|
+
[asgardeo]
|
|
1913
|
+
);
|
|
1914
|
+
const exchangeToken = (0, import_react15.useCallback)(
|
|
1915
|
+
async (config2, sessionId) => {
|
|
1916
|
+
return await asgardeo.exchangeToken(config2, sessionId);
|
|
1917
|
+
},
|
|
1918
|
+
[asgardeo]
|
|
1919
|
+
);
|
|
1920
|
+
const signOut = (0, import_react15.useCallback)(
|
|
1921
|
+
async (...args) => {
|
|
1922
|
+
return await asgardeo.signOut(...args);
|
|
1923
|
+
},
|
|
1924
|
+
[asgardeo]
|
|
1925
|
+
);
|
|
1926
|
+
const signUp = (0, import_react15.useCallback)(
|
|
1927
|
+
async (...args) => {
|
|
1928
|
+
return await asgardeo.signUp(...args);
|
|
1929
|
+
},
|
|
1930
|
+
[asgardeo]
|
|
1931
|
+
);
|
|
1932
|
+
const clearSession = (0, import_react15.useCallback)(
|
|
1933
|
+
async (...args) => {
|
|
1934
|
+
return await asgardeo.clearSession(...args);
|
|
1935
|
+
},
|
|
1936
|
+
[asgardeo]
|
|
1937
|
+
);
|
|
1938
|
+
const reInitialize = (0, import_react15.useCallback)(
|
|
1939
|
+
async (config2) => {
|
|
1940
|
+
return await asgardeo.reInitialize(config2);
|
|
1941
|
+
},
|
|
1942
|
+
[asgardeo]
|
|
1943
|
+
);
|
|
1900
1944
|
const value = (0, import_react15.useMemo)(
|
|
1901
1945
|
() => ({
|
|
1902
1946
|
applicationId,
|
|
@@ -1905,25 +1949,25 @@ var AsgardeoProvider = ({
|
|
|
1905
1949
|
signUpUrl,
|
|
1906
1950
|
afterSignInUrl,
|
|
1907
1951
|
baseUrl,
|
|
1908
|
-
clearSession
|
|
1909
|
-
getAccessToken
|
|
1952
|
+
clearSession,
|
|
1953
|
+
getAccessToken,
|
|
1910
1954
|
isInitialized: isInitializedSync,
|
|
1911
1955
|
isLoading: isLoadingSync,
|
|
1912
1956
|
isSignedIn: isSignedInSync,
|
|
1913
1957
|
organization: currentOrganization,
|
|
1914
1958
|
signIn,
|
|
1915
1959
|
signInSilently,
|
|
1916
|
-
signOut
|
|
1917
|
-
signUp
|
|
1960
|
+
signOut,
|
|
1961
|
+
signUp,
|
|
1918
1962
|
user,
|
|
1919
1963
|
http: {
|
|
1920
|
-
request
|
|
1921
|
-
requestAll
|
|
1964
|
+
request,
|
|
1965
|
+
requestAll
|
|
1922
1966
|
},
|
|
1923
|
-
reInitialize
|
|
1967
|
+
reInitialize,
|
|
1924
1968
|
signInOptions,
|
|
1925
|
-
getDecodedIdToken
|
|
1926
|
-
exchangeToken
|
|
1969
|
+
getDecodedIdToken,
|
|
1970
|
+
exchangeToken,
|
|
1927
1971
|
syncSession,
|
|
1928
1972
|
platform: config?.platform,
|
|
1929
1973
|
switchOrganization
|
|
@@ -1945,7 +1989,16 @@ var AsgardeoProvider = ({
|
|
|
1945
1989
|
asgardeo,
|
|
1946
1990
|
signInOptions,
|
|
1947
1991
|
syncSession,
|
|
1948
|
-
switchOrganization
|
|
1992
|
+
switchOrganization,
|
|
1993
|
+
getDecodedIdToken,
|
|
1994
|
+
getAccessToken,
|
|
1995
|
+
request,
|
|
1996
|
+
requestAll,
|
|
1997
|
+
exchangeToken,
|
|
1998
|
+
signOut,
|
|
1999
|
+
signUp,
|
|
2000
|
+
clearSession,
|
|
2001
|
+
reInitialize
|
|
1949
2002
|
]
|
|
1950
2003
|
);
|
|
1951
2004
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AsgardeoContext_default.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(I18nProvider_default, { preferences: preferences?.i18n, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|