Trying to fetch username and password async with sequelize - asynchronous

I am fetching username and password from KeyVault and creating a sequelize connection.
However since we need the connection at the time of model definition and keyVault fetched the details asynchronously I am unable to connect to DB.
Is there a workaround or document that can help?

Related

Generate Firebase Verify token on the backend side

We are migrating users to the Firebase and for specific app reasons I need to create a verify token on the backend side.
So the schema is next -
I receive the user email and password from the user. Passing it to
the backend.
Backend generates a verify token, retrieves all the
info from Firebase, and informs the user.
I'm looking for some way to do it with firebase SDK, but I don't see any option.

Firebase signInWithCustomToken custom claims not working in emulator only

I am setting up a firebase authentication system with firebase. As I wanted it to be username and password, I needed to do it myself.
The workflow is this:
Cloud function gets username and password
It get the corresponding email from firestore
It use signInWithEmailAndPassword() to sign in and get the user data
It it createCustomToken() with the user uid and data that I need
It returns the token to the webclient
Webclient use signInWithCustomToken() with the token
The onAuthStateChanged callback gets trigger and setup my data from the user data
This process works great when deploy in firebase.
The problem is that when I want to use it with the firebase emulator, the user variable on step 7 has no data (no email, no displayName, etc are all set to null). I know that custom token are not signed when generated from the emulator, but is there a way to still get the data out of them?
Thanks

AWS Amplify cannot enter user keys

I am going through the tutorial for AWS Amplify and I get to the point where I am to enter the keys for the newly created user
I get prompted for the access key:
Enter the access key of the newly created user:
? accessKeyId: [hidden]
I paste in the value for this and the secret key. But then it seems to fail with
You did NOT enter valid keys.
New user setup failed.
Error: New user setup failed.
at C:\Users\RKevi\AppData\Roaming\npm\node_modules\#aws-amplify\cli\node_modules\amplify-provider-awscloudformation\lib\setup-new-user.js:108:13
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Am I to type in the keys manually?
Thank you.

Is there any way to retrieve password from firebase?

I am managing SQL server database along with Firebase. I have created user's account in Firebase from back-end by below method and stores other properties
in Firebase by providing User UID as unique key.
firebase.auth().createUserWithEmailAndPassword(Email, Password).then(function (user) {
firebase.database().ref("Users/" + user.uid + "/").set({
favouriteId: FavouriteId,
hotelId: HotelRef,
isActive: IsActive,
isLoggedIn: IsLoggedIn,
name: Name,
vendorId: VendorId
}) });
User can use above credentials to login into mobile app.To change password of user I am using reset password by email from Firebase. Here Password is changing from mobile side and I am unable to update that password in SQL server.I want to update new password in SQL server database.
I have searched for above but I didn't find any solution or other way to get password from Firebase.
Currently I am calling API from mobile side to update password in SQL server.
Is there any way to retrieve updated password from Firebase database?
Why are you storing the password (never a good idea to store plain text password) when Firebase Auth already does this for you securely using best practices including salting and hashing the password. If you plan to use Firebase Auth, you may as well let them manage password authentication for you. If you need to migrate to another auth system at some point in time, Firebase Auth provides multiple tools to get the hashed passwords via CLI SDK and Firebase Admin SDK.

Error while registering user via Cognito on local DynamoDB

I faced with such error
Request must contain either a valid (registered) AWS access key ID or X.509 certificate.
While trying to register an user via Cognito in DynamoDB Local. An user registers ok when I disconnect from DynamoDB and I can create an record in db programmatically.
The error comes from the DynamoDB. Please have a look:
http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/CommonErrors.html

Resources