Skip to content

Commit b69e84f

Browse files
authored
Update Readme.md
1 parent 6c36e81 commit b69e84f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Readme.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,16 @@ exports.createUser = functions.https.onRequest(createUser);
7171
7272
```
7373
Then just post with postman to create_user function url an object and it will be eco back as aresponse
74+
75+
inorder to create service manager to get access to firebase database we need in index.js to add:
76+
```
77+
const admin = require('firebase-admin');
78+
79+
admin.initializeApp({
80+
credential: admin.credential.cert(serviceAccount),
81+
databaseURL: "https://one-time-password-b07e6.firebaseio.com"
82+
});
83+
```
84+
and to generate private key from console.firebase, from proget settings>Service accounts>generate new private key
85+
then open the downloaded file, and paste its conent to new create file under functions folder, name the file "service_acount.json".
86+

0 commit comments

Comments
 (0)