@asgardeo/react 0.5.8 → 0.5.9
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.
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { AsgardeoBrowserClient, UserProfile, SignInOptions, SignOutOptions, User, EmbeddedFlowExecuteResponse, SignUpOptions, EmbeddedFlowExecuteRequestPayload, EmbeddedSignInFlowHandleRequestPayload, Organization, IdToken, EmbeddedFlowExecuteRequestConfig, AllOrganizationsApiResponse, TokenResponse } from '@asgardeo/browser';
|
|
18
|
+
import { AsgardeoBrowserClient, UserProfile, SignInOptions, SignOutOptions, User, EmbeddedFlowExecuteResponse, SignUpOptions, EmbeddedFlowExecuteRequestPayload, EmbeddedSignInFlowHandleRequestPayload, Organization, IdToken, EmbeddedFlowExecuteRequestConfig, AllOrganizationsApiResponse, TokenResponse, HttpRequestConfig, HttpResponse } from '@asgardeo/browser';
|
|
19
19
|
import { AsgardeoReactConfig } from './models/config';
|
|
20
20
|
/**
|
|
21
21
|
* Client for mplementing Asgardeo in React applications.
|
|
@@ -58,5 +58,6 @@ declare class AsgardeoReactClient<T extends AsgardeoReactConfig = AsgardeoReactC
|
|
|
58
58
|
signOut(options?: SignOutOptions, sessionId?: string, afterSignOut?: (afterSignOutUrl: string) => void): Promise<string>;
|
|
59
59
|
signUp(options?: SignUpOptions): Promise<void>;
|
|
60
60
|
signUp(payload: EmbeddedFlowExecuteRequestPayload): Promise<EmbeddedFlowExecuteResponse>;
|
|
61
|
+
fetch(url: string, options?: HttpRequestConfig): Promise<HttpResponse<any>>;
|
|
61
62
|
}
|
|
62
63
|
export default AsgardeoReactClient;
|
package/dist/cjs/index.js
CHANGED
|
@@ -171,7 +171,8 @@ var AsgardeoContext = (0, import_react.createContext)({
|
|
|
171
171
|
signInSilently: null,
|
|
172
172
|
signOut: null,
|
|
173
173
|
signUp: null,
|
|
174
|
-
user: null
|
|
174
|
+
user: null,
|
|
175
|
+
fetch: () => null
|
|
175
176
|
});
|
|
176
177
|
AsgardeoContext.displayName = "AsgardeoContext";
|
|
177
178
|
var AsgardeoContext_default = AsgardeoContext;
|
|
@@ -842,6 +843,12 @@ var AsgardeoReactClient = class extends import_browser6.AsgardeoBrowserClient {
|
|
|
842
843
|
"The signUp method with SignUpOptions is not implemented in the React client."
|
|
843
844
|
);
|
|
844
845
|
}
|
|
846
|
+
async fetch(url, options) {
|
|
847
|
+
return this.asgardeo.httpRequest({
|
|
848
|
+
url,
|
|
849
|
+
...options
|
|
850
|
+
});
|
|
851
|
+
}
|
|
845
852
|
};
|
|
846
853
|
var AsgardeoReactClient_default = AsgardeoReactClient;
|
|
847
854
|
|
|
@@ -1722,6 +1729,9 @@ var AsgardeoProvider = ({
|
|
|
1722
1729
|
flattenedProfile: (0, import_browser13.generateFlattenedUserProfile)(payload, prev?.schemas)
|
|
1723
1730
|
}));
|
|
1724
1731
|
};
|
|
1732
|
+
const fetch = async (url, options) => {
|
|
1733
|
+
return asgardeo.fetch(url, options);
|
|
1734
|
+
};
|
|
1725
1735
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1726
1736
|
AsgardeoContext_default.Provider,
|
|
1727
1737
|
{
|
|
@@ -1740,7 +1750,8 @@ var AsgardeoProvider = ({
|
|
|
1740
1750
|
signInSilently,
|
|
1741
1751
|
signOut,
|
|
1742
1752
|
signUp,
|
|
1743
|
-
user
|
|
1753
|
+
user,
|
|
1754
|
+
fetch
|
|
1744
1755
|
},
|
|
1745
1756
|
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(I18nProvider_default, { preferences: preferences?.i18n, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1746
1757
|
BrandingProvider_default,
|