Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/data-and-deployment/firebase/data-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ReVISit stores study and participant data in Firebase, which is backed by Google
By default, Object Versioning is disabled for Firebase storage buckets. Without it, there is still a **one-week soft delete recovery window** in which data can be restored.
:::

reVISit data stored with Firebase lives in Google Cloud services:
ReVISit data stored with Firebase lives in Google Cloud services:

- Study and participant records are stored in **Cloud Firestore**.
- Files (for example, audio and screen recordings) are stored in **Cloud Storage for Firebase**, which uses a **Google Cloud Storage bucket**.
Expand All @@ -20,10 +20,13 @@ Every noncurrent object version is stored and billed until removed (manually or
1. Enable Object Versioning on your bucket:
- Open the [Google Cloud Console](https://console.cloud.google.com/).
- Go to **Cloud Storage** -> **Buckets** -> your Firebase bucket.
![Google Cloud Storage buckets page with a Firebase bucket selected](./img/data-recovery/step1.png)
- Open the **Protection** tab and enable **Object versioning**.
![Google Cloud Storage Protection tab with Object versioning](./img/data-recovery/step2.png)
2. View versions for one object:
- In the bucket's **Objects** tab, change **Show** to **Live and noncurrent objects**.
- Click the object name.
![Google Cloud Storage Objects tab showing live and noncurrent object versions](./img/data-recovery/step3.png)
- Open the **Version history** tab to see each generation.
3. (Optional) Restore an older version from that same version history view.

Expand Down
27 changes: 15 additions & 12 deletions docs/data-and-deployment/firebase/enabling-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,50 @@ In order to use authentication, you must have a Firebase application already con

## Enabling Authentication in Firebase

Start by navigating to your Firebase application dashboard. In the left-hand sidebar, choose the 'Authentication' tab.

![Console](./img/auth-1.jpg)
Start by navigating to your Firebase application dashboard. In the left-hand sidebar, choose the "Authentication" tab.

Once here, choose the "Sign-in method" in the top sidebar. Here we can add additional providers for signing in. ReVISit only allows for Google SSO. Click on "Add New Provider".

![Console](./img/auth-2.jpg)
![Firebase Authentication sign-in method page](./img/auth1.png)

In the provider section, click on "Google".

![Console](./img/auth-3.jpg)
![Firebase provider selection page with Google highlighted](./img/auth2.png)

Upon clicking "enable", you will be prompted with providing some information about the application. You can leave these as their defaults. Click "save" and then Google SSO will be enabled in your application immediately.
Upon clicking "Enable", you will be prompted with providing some information about the application. You can leave these as their defaults. Click "Save" and then Google SSO will be enabled in your application immediately.

![Console](./img/auth-4.jpg)
![Firebase Google sign-in provider setup page](./img/auth3.png)

## Adding Authorized Domains

Once you have deployed your reVISit application to a website, you'll need to ensure that Google SSO is authorized to redirect back to your website once a user has signed in. To do this, navigate to the "Authentication" section of your Firebase application. In the "Settings" tab you will see an "Authorized Domains" section. Add your domain name(s) using the "Add domain" button on the right.

![Firebase authorized domains settings page](./img/auth4.png)

## Enabling Authentication in reVISit

:::warning
Note that if your application has been deployed but you have _not_ added your custom authorized domain, then attempting to enable authentication will result in an error.
:::

Through the settings cog on the right of your reVISit application, navigate to the "settings" page. Here, you will see that authentication will be currently disabled with a button to enable authentication.
Through the settings cog on the right side of your reVISit application, navigate to the "Settings" page. Authentication will be disabled by default, with a button to enable it.

When you first enable authentication, you will be prompted to sign in using Google SSO. The account you choose will automatically be added as a user. Any other account that attempts to log in to reVISit and access protected routes will be redirected to the login screen.


When you first enable authentication, you will be prompted to sign in using Google SSO. The account chosen will automatically be added as a user. Any other account attempting to log in to reVISit and access these protected routes will be redirected to the login screen.
![ReVISit settings page with Google sign-in](./img/auth5.png)

## Manage Administrators in reVISit

### Adding Additional Users

To add another administrator, simply navigate to the settings page (where you enabled authentication) and click on the "Add User" icon to the right of the "Enabled Users" section. Enter the Google account email for the user and click save. They will now be an administrator and will immediately be able to log into your reVISit application.
To add another administrator, simply navigate to the Settings page (where you enabled authentication) and click on the "Add User" icon to the right of the "Enabled Users" section. Enter the Google account email for the user and click "Save". They will now be an administrator and will immediately be able to log into your reVISit application.

![Add User](./../img/manage_admin/add_user.png)

### Removing A User

In the "Enabled Users" section, you will see the "delete" icon to the right of each user aside from yourself. Any administrator is capable of deleting any user from the reVISit system. The only restriction is that you cannot delete yourself and there can never be less than one user.
In the "Enabled Users" section, you will see the "Delete" icon to the right of each user except yourself. Any administrator can delete any other user from the reVISit system. The only restrictions are that you cannot delete yourself and there must always be at least one user.

![Remove User](./../img/manage_admin/remove_user.png)

Expand All @@ -59,4 +62,4 @@ import StructuredLinks from '@site/src/components/StructuredLinks/StructuredLink
{name: "Firebase Setup", url: "../setup"},
{name: "Firebase Authentication", url: "https://firebase.google.com/products/auth"},
]}
/>
/>
Binary file removed docs/data-and-deployment/firebase/img/auth-1.jpg
Binary file not shown.
Binary file removed docs/data-and-deployment/firebase/img/auth-2.jpg
Binary file not shown.
Binary file removed docs/data-and-deployment/firebase/img/auth-3.jpg
Binary file not shown.
Binary file removed docs/data-and-deployment/firebase/img/auth-4.jpg
Binary file not shown.
Binary file added docs/data-and-deployment/firebase/img/auth1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/data-and-deployment/firebase/img/auth2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/data-and-deployment/firebase/img/auth3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/data-and-deployment/firebase/img/auth4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/data-and-deployment/firebase/img/auth5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Loading
Loading