Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3401096
D10336.id34700.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10336.id34700.diff
View Options
diff --git a/native/event-emitters/csa-auth-metadata-emitter.js b/native/event-emitters/csa-auth-metadata-emitter.js
new file mode 100644
--- /dev/null
+++ b/native/event-emitters/csa-auth-metadata-emitter.js
@@ -0,0 +1,27 @@
+// @flow
+
+import { NativeModules, NativeEventEmitter } from 'react-native';
+
+import { type IdentityServiceAuthLayer } from 'lib/types/identity-service-types.js';
+
+type CommServicesAuthMetadataEmitterConstants = {
+ +COMM_SERVICES_AUTH_METADATA: 'commServicesAuthMetadata',
+};
+
+type CommServicesAuthMetadataEmitterModuleType = {
+ +addListener: (eventName: string) => void,
+ +removeListeners: (count: number) => void,
+ +getConstants: () => CommServicesAuthMetadataEmitterConstants,
+ ...CommServicesAuthMetadataEmitterConstants,
+};
+
+const CommServicesAuthMetadataEmitterModule: CommServicesAuthMetadataEmitterModuleType =
+ NativeModules.CommServicesAuthMetadataEmitter;
+
+function getCommServicesAuthMetadataEmitter(): NativeEventEmitter<{
+ +commServicesAuthMetadata: [IdentityServiceAuthLayer],
+}> {
+ return new NativeEventEmitter(CommServicesAuthMetadataEmitterModule);
+}
+
+export { getCommServicesAuthMetadataEmitter };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 10:28 AM (21 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2611333
Default Alt Text
D10336.id34700.diff (1 KB)
Attached To
Mode
D10336: Enable JS to subscribe to auth metadata events
Attached
Detach File
Event Timeline
Log In to Comment