Skip to content

Added docs for firebase authentication, firestore and storage Modular V9 #3176

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

Closed
wants to merge 2 commits into from

Conversation

Sapython
Copy link

@Sapython Sapython commented Mar 11, 2022

Added docs for modular firebase authentication, modular firestore documents, and collections.

Added a simple and full-fledged authentication documentation with examples and best practices.

Added configuration methods and properties for firebase auth.

  1. Tenant Id
  2. Language Code
  3. Auth Persistence
  4. Set Local Language

Added complete docs for accessing and using collections in firebase firestore with full examples

  1. Get docs single time
  2. Real-time collection changes
  3. Only changes observable
  4. Perform simple and compound queries
  5. Paginate data
  6. Order and limit data

Features list of document querying

  1. Create a document
  2. Update a document
  3. Delete a document
  4. Observer a document for changes
  5. Inline querying like
  • Incrementing field value
  • Adding data in an array
  • Removing data from an array
  1. Offline data persistence

Added docs for firebase storage

Topics covered

  1. Inject storage service
  2. Import and initialize cloud storage
  3. Add any file to the cloud storage
  4. Check upload Percentage using observables
  5. Get the download link of the uploaded file
  6. Deleting file from a storage reference
  7. Custom metadata
  8. Update metadata
  9. Set cache policy for files
  10. Full list of metadata properties
  11. List all files from a storage reference
  12. Paginate list results
  13. Handle error messages

More features will be added subsequently

Description

This pull request includes documentation for authentication and firestore collections.

Checklist

  • Issue number for this PR: #nnn (required)
  • Docs included?: (yes/no; required for all API/functional changes)
  • Test units included?: (yes/no; required)
  • In a clean directory, yarn install, yarn test run successfully? (yes/no; required)

Description

Code sample

# Added docs for modular firebase authentication, modular firestore documents, and collections.
Added a simple and full-fledged authentication documentation with examples and best practices.
## Added configuration methods and properties for firebase auth.
1. Tenant Id
2. Language Code
3. Auth Persistence
4. Set Local Language

## Added complete docs for accessing and using collections in firebase firestore with full examples
1. docs single time
2. Real-time collection changes
3. Only changes observable
4. Perform simple and compound queries
6. Paginate data
7. Order and limit data

## Features list of document querying
1. Create a document
2. Update a document
3. Delete a document
4. Observer a document for changes
5. Inline querying like
  * Incrementing field value
  * Adding data in an array
  * Removing data from an array
6. Offline data persistence

### Description

This pull request includes documentation for authentication and firestore collections.
## Topics covered

1. Inject storage service
2. Import and initialize cloud storage
3. Add any file to the cloud storage
4. Check upload Percentage using observables
5. Get download link of the uploaded file
6. Deleting file from a storage reference
7.  Custom metadata
8. Update metadata
9. Set cache policy for files
10. Full list of metadata properties
11. List all files from a storage reference
12. Paginate list results
13. Handle error messages

### More features will be added subsequently
@Sapython Sapython changed the title Added docs for firebase authentication and firestore Modular V9 Added docs for firebase authentication, firestore and storage Modular V9 Mar 11, 2022
@Sapython
Copy link
Author

Can you guys merge this PR? Or if there is a problem tell me.

@lazmeister
Copy link

Not sure if this is the best method for grabbing documents from a collection.

getDocs(collection(this.firestore, "data")).then( (querySnapshot: QuerySnapshot) => { this.items = []; querySnapshot.forEach((doc: any) => { this.items.push(doc.data()); }); } );

I ended up with something like

getItemsFromCollection(): Observable<Items[]> { const collectionRef = collection(this.firestore, "data"); return collectionData(collectionRef) as Observable<Items[]>; }

Then subscribed to this via the component

@Sapython
Copy link
Author

So can you implement it in the docs? Open a PR in my repo and I will pull it.

@rhuanbarros
Copy link

Not sure if this is the best method for grabbing documents from a collection.

getDocs(collection(this.firestore, "data")).then( (querySnapshot: QuerySnapshot) => { this.items = []; querySnapshot.forEach((doc: any) => { this.items.push(doc.data()); }); } );

I ended up with something like

getItemsFromCollection(): Observable<Items[]> { const collectionRef = collection(this.firestore, "data"); return collectionData(collectionRef) as Observable<Items[]>; }

Then subscribed to this via the component

I'm doing the same and it's working fine here.

@rhuanbarros
Copy link

Added docs for modular firebase authentication, modular firestore documents, and collections.

Added a simple and full-fledged authentication documentation with examples and best practices.

Added configuration methods and properties for firebase auth.

1. Tenant Id

2. Language Code

3. Auth Persistence

4. Set Local Language

Added complete docs for accessing and using collections in firebase firestore with full examples

1. Get docs single time

2. Real-time collection changes

3. Only changes observable

4. Perform simple and compound queries

5. Paginate data

6. Order and limit data

Features list of document querying

1. Create a document

2. Update a document

3. Delete a document

4. Observer a document for changes

5. Inline querying like


* Incrementing field value

* Adding data in an array

* Removing data from an array


6. Offline data persistence

Added docs for firebase storage

Topics covered

1. Inject storage service

2. Import and initialize cloud storage

3. Add any file to the cloud storage

4. Check upload Percentage using observables

5. Get the download link of the uploaded file

6. Deleting file from a storage reference

7. Custom metadata

8. Update metadata

9. Set cache policy for files

10. Full list of metadata properties

11. List all files from a storage reference

12. Paginate list results

13. Handle error messages

More features will be added subsequently

Description

This pull request includes documentation for authentication and firestore collections.

Checklist

* Issue number for this PR: #nnn (required)

* Docs included?: (yes/no; required for all API/functional changes)

* Test units included?: (yes/no; required)

* In a clean directory, `yarn install`, `yarn test` run successfully? (yes/no; required)

Description

Code sample

thank you so much

@Sapython
Copy link
Author

Started working on remote config.

@Sapython
Copy link
Author

@jamesdaniels can you merge this or tell me if there are some problems.

@jamesdaniels
Copy link
Member

I think we're going to steer clear of long form content on this repository, instead aim only for reference docs.

I think this would be great for a blog post, we could potentially link to "other resources" in the README, & amplify if you take a pass at hosting this on medium or somewhere.

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

Successfully merging this pull request may close these issues.

4 participants