When I directly retrieve a document using .doc().get() firestore security rues deny permission. What do I need to do to allow CRUD operations for authenticated users of my Ionic app?
I have the following function in my PWA Ionic app

```
``` async getUserProfile(): Promise<firebase.firestore.DocumentSnapshot> {
          const user: firebase.User = await this.authProvider.getUser();
          this.currentUser = user;
          console.log('found current user');
          this.userProfile = firebase.firestore().doc(`userProfile/${user.uid}`);
          console.log('returing userprofile', this.userProfile.get());
          return this.userProfile.get();
  }```

```

But the call to this.userprofile.get() fails due to security warning from Firestore Security rules

> 
> found current user
> returing userprofile
> ZoneAwarePromise
> \_\_zone\_symbol\_\_state: 0
> \_\_zone\_symbol\_\_value: **FirebaseError: Missing or insufficient permissions.** at new e (http://localhost:8100/vendor.js:92760:23) at http://localhost:8100/vendor.js:102987:28
> .
> .
> .
> (http://localhost:8100/polyfills.js:10248:56)
> code: "permission-denied"
> name: "FirebaseError"
> toString: ƒ ()
> message: "Missing or insufficient permissions."
> stack: "FirebaseError: Missing or insufficient permissions.\n at new e
> 
> 
> 

The Firestore Security Rules are set simply as

```
service cloud.firestore {
  match /databases/{database}/documents {
   match /userProfile/{userId}/{documents=**} {
      allow read, update, get,delete: if request.auth != null && request.auth.uid == userId;
      allow create: if request.auth != null;
    }
  }
} 

```

What should be the correct security rule to implement to allow authenticated users to CRUD their documents? Or the correct way to retrieve the document from the collection

UPDATE: It works directly from the simulator but not from the app
[![Screenshot for Rules Simulator. It works there](https://i.stack.imgur.com/onh75.png)](https://i.stack.imgur.com/onh75.png)