guardian / guardian/dotcom-rendering
Make Okta code platform aware
- Dominant language
- TypeScript
- Stars
- 274
- Forks
- 34
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 121
Description
On dotcom,we use our Okta intergration via the identity-auth library to determine when and whether to show certain components, such as support banners.
Now that mobile apps use the same templates as dotcom, they make the same calls to identity-auth, but these calls don't work as Okta tokens are unavailable in the apps webview. Instead, apps use Bridget's [`getUserClient`](https://github.com/guardian/dotcom-rendering/blob/59e527b2474a2e40f3c5e0214d54e8b5f2b56e97/dotcom-rendering/src/lib/bridgetApi.ts#L79) method to get user data.
We should provide some abstraction, possibly within [`getAuthStatus`](https://github.com/guardian/dotcom-rendering/blob/59e527b2474a2e40f3c5e0214d54e8b5f2b56e97/dotcom-rendering/src/lib/identity.ts#L184), to make calls to the correct identity service depending on whether we are in mobile apps or dotcom.
Contributor guide
Assessment
This issue has not been assessed yet.