Clarify responsibilities of frontend-auth and refactor

Description

We’d like to refactor frontend-auth a bit. It’s currently rather opinionated about how it gets used, and tightly couples its functionality to an axios API client, which feels like a separate concern. It assumes that consumers are using redux and redux-thunk, and only provides authenticated user information in a way that’s consumable by those libraries. We also have a few other updates to make that we’re bundling in here, assuming we may create subtasks for the below.

Subtasks:

  • Remove actions and reducers.

  • Remove UserAccountApiService.

  • Remove getAuthenticationState

  • Run npm audit as part of Travis.

  • Export as ES6 modules with Babel 7, not as a bundled artifact.

  • Update peerDependencies.

  • Stop initializing logging in frontend-auth getAuthenticatedAPIClient - that’s the app’s responsibility.

  • Consider refactoring authInterface.js to create a separation between the httpClient and the actual authentication interface. They’re separate concerns. The httpClient may eventually want to live in a “frontend-api” repo, and so it’d be nice to take a first stab at teasing them apart.

 

Status

Epic Link

Story Points

None

Assignee

Unassigned

Reporter

David Joy

Labels

None