academe-kit 0.7.7 → 0.8.1
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/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +4 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/types/context/SecurityProvider/types.d.ts +1 -0
- package/package.json +1 -1
- package/dist/index.js +0 -8724
- package/dist/index.js.map +0 -1
- package/dist/types/services/CourseLogService.d.ts +0 -12258
- /package/dist/types/services/{userService.d.ts → UserService.d.ts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -20671,6 +20671,7 @@ type AcademeKeycloakContextProps = {
|
|
|
20671
20671
|
initOptions?: KeycloakInitOptions;
|
|
20672
20672
|
skipApiUserFetch?: boolean;
|
|
20673
20673
|
children: React.ReactElement;
|
|
20674
|
+
redirectUri?: string;
|
|
20674
20675
|
};
|
|
20675
20676
|
type SecurityProviderProps = {
|
|
20676
20677
|
hubUrl?: string;
|
package/dist/index.esm.js
CHANGED
|
@@ -6037,11 +6037,12 @@ const setCookie = (name, value, domain) => {
|
|
|
6037
6037
|
}
|
|
6038
6038
|
document.cookie = cookieParts.join("; ");
|
|
6039
6039
|
};
|
|
6040
|
-
const AcademeAuthProvider = ({ realm, hubUrl, children, clientId, keycloakUrl, apiBaseUrl, skipApiUserFetch, }) => {
|
|
6040
|
+
const AcademeAuthProvider = ({ realm, hubUrl, children, clientId, keycloakUrl, apiBaseUrl, redirectUri, skipApiUserFetch, }) => {
|
|
6041
6041
|
const oidcConfig = {
|
|
6042
6042
|
authority: `${keycloakUrl}/realms/${realm}`,
|
|
6043
6043
|
client_id: clientId,
|
|
6044
|
-
redirect_uri:
|
|
6044
|
+
redirect_uri: redirectUri ||
|
|
6045
|
+
typeof window !== "undefined"
|
|
6045
6046
|
? window.location.origin
|
|
6046
6047
|
: process.env.NEXT_PUBLIC_REDIRECT_URI,
|
|
6047
6048
|
scope: "openid profile email",
|
|
@@ -6344,7 +6345,7 @@ const SecurityProvider = ({ apiBaseUrl = "https://stg-api.academe.com.br", skipA
|
|
|
6344
6345
|
}, []);
|
|
6345
6346
|
// Memoizar o value do context para evitar re-renders desnecessários
|
|
6346
6347
|
const contextValue = useMemo(() => ({
|
|
6347
|
-
isInitialized: !isLoading || isRefreshing
|
|
6348
|
+
isInitialized: !isLoading || isRefreshing,
|
|
6348
6349
|
isTokenReady,
|
|
6349
6350
|
user: currentUser,
|
|
6350
6351
|
refreshUserData,
|