Clone from GitHub
cd into /functions
run npm install
Run npm run serve
You may have to install firebase-tools globally to get serve to work
npm install -g firebase-tools
Because this is a personal project using GCP and Firebase, the URL's will not be made public as to not incure unnecessary costs. API documentation is purely for demonstration purposes
Endpoint: POST /users-createEmailUser
Example body:
{
"email": "[email protected]",
"password": "test12"
}
Example response:
{
"message": "Successfully created email user",
"user": {
"uid": "yOQm...",
"email": "[email protected]",
"emailVerified": false,
"isAnonymous": false,
"providerData": [
{
"providerId": "password",
"uid": "[email protected]",
"displayName": null,
"email": "[email protected]",
"phoneNumber": null,
"photoURL": null
}
],
"stsTokenManager": {
"refreshToken": "AIwUaOkU...",
"accessToken": "eyJhbGciO...",
"expirationTime": 1656804060344
},
"createdAt": "1656800460165",
"lastLoginAt": "1656800460165",
"apiKey": "AI...",
"appName": "[DEFAULT]"
}
}
Endpoint: POST /users-signInEmailUser
Example body:
{
"email": "[email protected]",
"password": "test12"
}
Example response:
{
"message": "Successfully created email user",
"user": {
"uid": "yOQm...",
"email": "[email protected]",
"emailVerified": false,
"isAnonymous": false,
"providerData": [
{
"providerId": "password",
"uid": "[email protected]",
"displayName": null,
"email": "[email protected]",
"phoneNumber": null,
"photoURL": null
}
],
"stsTokenManager": {
"refreshToken": "AIwUaOkU...",
"accessToken": "eyJhbGciO...",
"expirationTime": 1656804060344
},
"createdAt": "1656800460165",
"lastLoginAt": "1656800460165",
"apiKey": "AIza...",
"appName": "[DEFAULT]"
}
}
Endpoint: GET /users-signoutUser
Example response:
{
"message": "Successfully signed out"
}