@insforge/react 1.0.2-refresh.2 → 1.0.2-refresh.3

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.js CHANGED
@@ -2210,7 +2210,19 @@ function InsforgeProviderCore({
2210
2210
  const unsubscribe = manager.subscribe((newState) => {
2211
2211
  setState(newState);
2212
2212
  });
2213
- void manager.initialize();
2213
+ void manager.initialize().then(() => {
2214
+ const params = new URLSearchParams(window.location.search);
2215
+ if (params.has("access_token")) {
2216
+ const url = new URL(window.location.href);
2217
+ url.searchParams.delete("access_token");
2218
+ url.searchParams.delete("user_id");
2219
+ url.searchParams.delete("email");
2220
+ url.searchParams.delete("name");
2221
+ url.searchParams.delete("csrf_token");
2222
+ url.searchParams.delete("error");
2223
+ window.history.replaceState({}, document.title, url.toString());
2224
+ }
2225
+ });
2214
2226
  return () => {
2215
2227
  unsubscribe();
2216
2228
  };