Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Smart-On-Fhir implementation inside Service Worker #169

Open
adunsulag opened this issue May 2, 2023 · 0 comments
Open

Question: Smart-On-Fhir implementation inside Service Worker #169

adunsulag opened this issue May 2, 2023 · 0 comments

Comments

@adunsulag
Copy link

Has anyone using this library explored using it in conjuction with service workers for handling a public app refresh token?

So I've been exploring different approaches to securing a refresh token on a public app. Currently from my readings the best recommended approach is to use a Backend For Frontend (BFF) OAuth2 proxy, but there is a draft IETF Best Current Practices (BCP) that discusses using a browser ServiceWorker as an alternative proxy for holding and maintaining a refresh token.

I'm wondering if anyone leveraging this library has explored that approach? The IETF BCP link is here: https://www.ietf.org/archive/id/draft-ietf-oauth-browser-based-apps-12.html#name-acquiring-tokens-from-a-ser

It looks like the library would need to be adapted to use the service worker Cache to manipulate and deal with the access and refresh token properties since service workers can't access sessionStorage or localStorage. I'd be interested in helping to code this up, if this seems like it'd be a viable option for the library. If it doesn't fit the scope of this library, just let me know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant