Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrypt msg to uid #50

Open
sudoharish opened this issue May 19, 2020 · 4 comments
Open

Decrypt msg to uid #50

sudoharish opened this issue May 19, 2020 · 4 comments

Comments

@sudoharish
Copy link

We have shared a reference implementation for processUploadedData, you can find the logic to decrypt exchanged messages to uid here:

https://github.com/opentrace-community/opentrace-cloud-functions/blob/master/functions/src/opentrace/processUploadedData.ts#L104

not able to understand how to use logic
how to get uid or mobile no. from street past record>msg, or how to decrypt encrypted msg

Sure. There's a file called CustomEncrypter.ts with a decryptTempID, you can find more decryptions. you can look there and i'm sure you are going to find a solution

Originally posted by @ie76 in #13 (comment)

how to call that and put msg argument, do i need to do it from command line from cloud function directory in my local machine
or from the firebase test section

Originally posted by @sudoharish in opentrace-community/opentrace-cloud-functions#36 (comment)

@sudoharish sudoharish changed the title > We have shared a reference implementation for processUploadedData, you can find the logic to decrypt exchanged messages to uid here: Decrypt msg to uid May 19, 2020
@alexissinglaire
Copy link

@sudoharish : hi, what are you trying to do here? did you encountered error when operating the app? or you want to do some enhancement in the app ?

@sudoharish
Copy link
Author

How to trace the mobile no. , I m successful ly able to se .json file in cloud storage, in other bucket getting error file not street pass record, on checking logs of uploaded data function.

@alexissinglaire
Copy link

alexissinglaire commented May 20, 2020

@sudoharish :
you can put this code at the beginning of getUploadToken routine , before the await .
refer to this link for properties and method that available for admin.auth() .userRecord.

admin.auth().getUser(uid)
.then(function(userRecord) {
// See the UserRecord reference doc for the contents of userRecord.

console.log('Phone number value =', userRecord.phoneNumber);

})
.catch(function(error) {
console.log('Error fetching user data:', error);
});

https://firebase.google.com/docs/reference/admin/node/admin.auth.UserRecord

@supernovahimura
Copy link

Hello, how do i know that "uid" does my record belong inside the .json file? To later communicate with the user.
Selección_001edit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants