Skip to content
This repository was archived by the owner on Oct 26, 2023. It is now read-only.
This repository was archived by the owner on Oct 26, 2023. It is now read-only.

Document with code sample a production way of sharing the API client instance across the app + can this be the same as the Authentication context #7

@devraj

Description

@devraj

The API Client is instantiated (both for autorest and otc) and it can keep track of authentication tokens and automatically add that to the header as required. Both clients generate wrappers for calling the API endpoints.

Using React context we could pass the API client (I need to critique this after the initial implementation, but on first thoughts it seems to be a legitimate option).

An reference implementation to be provided and this ticket needs to be revisited.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions