Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Sage-Bionetworks/SageAccountWeb

Repository files navigation

This project is code for OneSage user account portal.

Production branch is automatically deployed to https://accounts.sagebionetworks.org

Staging branch is automatically deployed to https://staging.accounts.sagebionetworks.org

How do I add my app to OneSage?

  1. Create an OAuth 2.0 Client for use with Synapse. You can skip this step if you have an internal app running on a known .synapse.org subdomain.
  2. Create a new Jira ticket in the PORTALS project, or open a Service Desk ticket if outside Sage, requesting that your app be listed in OneSage. Please include the following information:
    • Default URL: Where can we find the production version of this app?
    • Name: The friendly name of your app
    • Logo: Your app logo. The logo should contain the name of your app, and preferably be a svg.
    • Primary and Secondary colors: These are used to generate a palette.
    • Description: A plain text short description of your app (<200 characters).
    • OAuth Client ID: If using an OAuth Client to connect, please provide your 'client ID'. This value will be used as your 'appId'.
  3. Web Engineering will send you an 'appId'. To show the user a branded experience, the 'appId' should be given as a query parameter when you link to the OneSage website for sign-in or account registration (see below). You should also provide the 'redirectURL' query parameter.

Note to Web Engineer: We are currently using this Synapse Table as the data source.

Entry points

Redirect to App

/

The root prompts you to sign in or register for an account. Once this is complete, the user will be redirected back to the calling app (see the note about query parameters below).

Account Registration

/register1

Takes you to a place where you can create a Sage account. It links to Google-based account creation, or email-based account creation.

Profile Validation

/authenticated/validate

Walks you through account identity verification. This will prompt for login if a session is not already established.

My Account

/authenticated/myaccount

Takes you to your Sage Account Settings page. This will prompt for login if a session is not already established.

Joining a team

/jointeam?signedToken=

When inviting a Synapse user (or external email) to join a Synapse Team, this route should be used. The Synapse backend will append a (hex encoded) signed token to this route. The OneSage website will process this accordingly. If the user already has an account, they will be immediately added to the Team. If they do not yet have an account, this will lead the user through the registration process and eventually add the user to the Team.

Force logout

/logout

This will immediately log you out of your account.

Note about query parameters

All routes look for the query parameter 'appId' to set the source app configuration (icon, application name, ...). For example, '/register1?appId=MTB' can be used to register for a new Sage Bionetworks account with the Mobile Toolbox product branding.

All routes also looks for the query parameter 'redirectURL'. This is used to redirect back to the source app on various pages on the OneSage website.

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published