@grasp-labs/ds-microfrontends-integration 0.8.0 → 0.10.0
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/README.md
CHANGED
|
@@ -233,6 +233,8 @@ app.use(devAuthMiddleware());
|
|
|
233
233
|
|
|
234
234
|
Skip the form entirely by setting `DEV_AUTH_TOKEN` (env var or `.env` file) before starting the server. Need a token? Call the dev auth endpoint with your usual credentials and copy the `access_token`.
|
|
235
235
|
|
|
236
|
+
After a successful login, the middleware redirects to `process.env.VITE_BASE_PATH` when set, otherwise `/` (override via `redirectAfterLoginPathTo` if needed).
|
|
237
|
+
|
|
236
238
|
### Scripts
|
|
237
239
|
|
|
238
240
|
- `npm run build` - Build the library
|
|
@@ -9,7 +9,7 @@ export type DevLoginOptions = {
|
|
|
9
9
|
/**
|
|
10
10
|
* Location to redirect to after successful authentication. The same
|
|
11
11
|
* normalization rules apply as for {@link loginPath}.
|
|
12
|
-
* @default "/"
|
|
12
|
+
* @default process.env.VITE_BASE_PATH || "/"
|
|
13
13
|
*/
|
|
14
14
|
redirectAfterLoginPathTo?: string;
|
|
15
15
|
/**
|
|
@@ -134,10 +134,10 @@ function y(e) {
|
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function v(e = {}) {
|
|
138
138
|
const {
|
|
139
139
|
loginPath: t = "/__login",
|
|
140
|
-
redirectAfterLoginPathTo: r = "/",
|
|
140
|
+
redirectAfterLoginPathTo: r = process.env.VITE_BASE_PATH || "/",
|
|
141
141
|
authEndpoint: n = "https://auth-dev.grasp-daas.com/rest-auth/login/"
|
|
142
142
|
} = e, o = g(t, "loginPath"), c = g(
|
|
143
143
|
r,
|
|
@@ -238,5 +238,5 @@ const l = {
|
|
|
238
238
|
};
|
|
239
239
|
export {
|
|
240
240
|
l as DEV_AUTH_TOKEN,
|
|
241
|
-
|
|
241
|
+
v as devAuthMiddleware
|
|
242
242
|
};
|