Skip to content

Authenticate with OpenCRVS before saving #8546

@tumbledwyer

Description

@tumbledwyer

🚀 Requirement

Depends on: #8545

As a user
I would like to be sure that I am authenticated when saving a record

Since authentication with openCRVS only happens when fetching lookups, there is nothing to stop a record being saved by an unauthenticated user on the backend.

To solve this, before saving to mongo, authenticate with any endpoint on openCRVS that makes sense and bubble up any 401 errors.
The getUserDetails endpoint may be a good one to use.

Tech tasks

  • Add a call to an openCVRS endpoint before saving
  • Handle 401s and bubble up to the frontend

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions