buoy_impersonate 0.3.0 copy "buoy_impersonate: ^0.3.0" to clipboard
buoy_impersonate: ^0.3.0 copied to clipboard

Buoy user-impersonation tool for Flutter — test your app as any user without logging out. Search identities, activate an override, and read the injected header on-device.

buoy_impersonate #

Buoy user-impersonation tool for Flutter — a 1:1 port of @buoy-gg/impersonate. Test your app as any user/role without logging out: search identities, activate an override, and inject the impersonation header into your HTTP requests. State persists across launches and mirrors live to Buoy Desktop.

Usage #

import 'package:buoy_impersonate/buoy_impersonate.dart';

// Register with your app's user search + optional cache-clear callbacks.
registerBuoyImpersonate(
  onSearchUsers: (query) async => api.searchUsers(query), // returns List<ImpersonateUser>
  onClearReactQuery: () => cache.clear(),
);

// Read the injected header from your HTTP client (Flutter has no global fetch
// to patch, so you apply it — e.g. a Dio interceptor):
dio.interceptors.add(InterceptorsWrapper(onRequest: (options, handler) {
  options.headers.addAll(BuoyImpersonate.instance.impersonationHeaders);
  handler.next(options);
}));

Wrap your app in BuoyDevTools (from the buoy umbrella) to show the tool in the floating dial.

License #

Proprietary — see LICENSE.

0
likes
140
points
92
downloads

Documentation

API reference

Publisher

verified publisherbuoy.gg

Weekly Downloads

Buoy user-impersonation tool for Flutter — test your app as any user without logging out. Search identities, activate an override, and read the injected header on-device.

License

unknown (license)

Dependencies

buoy_core, buoy_shared_ui, flutter, shared_preferences

More

Packages that depend on buoy_impersonate