Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3400646
D10336.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.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 UserLoginResponse } 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: [UserLoginResponse],
+}> {
+ return new NativeEventEmitter(CommServicesAuthMetadataEmitterModule);
+}
+
+export { getCommServicesAuthMetadataEmitter };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 8:20 AM (21 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2610982
Default Alt Text
D10336.diff (1 KB)
Attached To
Mode
D10336: Enable JS to subscribe to auth metadata events
Attached
Detach File
Event Timeline
Log In to Comment