Authentication and authorization

The React dashboard needs to be able to authenticate its users, and perform authorized calls on some microservices. It also needs to let the user grant access to Strava.

We make the assumption that the dashboard only works when you are authenticated, and that there are two kinds of users: first-time user and returning user.

Following is the user story for first-time users:

As a first-time user, when I visit the dashboard, there's a "login" link. When I click on it, the dashboard redirects me to Strava to grant access to my resources. Strava then redirects me back to the dashboard, and I am connected. The dashboard then starts to fill with my data.

As described, our Flask app performs an OAuth2 dance with Strava to authenticate users. Connecting to Strava also means we need to store the access token into the Runnerly user profile so we can use it to fetch runs later on.

Before going further, we need to make a design decision: do we want the dashboard merged with the DataService, or do we want to have two separate apps?

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset