keycloak-angular icon indicating copy to clipboard operation
keycloak-angular copied to clipboard

Offline functionality for PWAs

Open xCryzed opened this issue 4 years ago • 8 comments

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search for issues before submitting
- [x ] feature request

Desired functionality.

It would be nice to use keycloak-angular also offline for our PWA. We have the problem that we got redirected instantly when we're losing connection and refresh the page. Is there a good solution yet?

xCryzed avatar Mar 03 '20 09:03 xCryzed

Do you mean such features?

https://www.keycloak.org/docs/latest/server_admin/index.html#_offline-access

stephane-dereppe avatar Mar 04 '20 06:03 stephane-dereppe

Unfortunately offline tokens don't solve our problem. We still get redirected. We need a way to deactivate the keycloak when we're offline.

xCryzed avatar Mar 04 '20 14:03 xCryzed

Then I'll create a new issue for that because I need it.

stephane-dereppe avatar Mar 05 '20 11:03 stephane-dereppe

@xCryzed can it work with Silent SSO? With silent SSO you won't have redirects.

Do you have any idea about how to implement offline feature with offline_token?

Thanks

Wlada avatar Mar 12 '20 17:03 Wlada

Silent SSO will still prevent any redirects, but might still break in some other fashion if no network is available. @xCryzed if you can please try out Silent SSO and share your experiences.

jonkoops avatar Mar 17 '20 16:03 jonkoops

I'm struggling with the same problem at the moment and didn't find a solution so far. But I found a Vue.js project that also uses keycloak-js with offline support: https://github.com/dukecon/dukecon_pwa/blob/0a2b0c08feed8e383b29f88eca65b55113d5c74a/src/DukeconKeycloak.js Maybe that is helpful for somebody and we manage to find an angular solution :)

dome4 avatar Mar 28 '20 22:03 dome4

hi all,

Did someone find a solution as how to make keycloak-angular work with PWA? Did the post of dome4 using the keycloak adapter directly help?

fstouten avatar Mar 24 '22 11:03 fstouten

Did someone find a solution as how to make keycloak-angular work with PWA? Did the post of dome4 using the keycloak adapter directly help?

Not as I know. From previous post. I understand that offline tokens don't do the job. I wonder how native app handle that? You don't have to login again and again on those apps...

stephane-dereppe avatar Mar 24 '22 16:03 stephane-dereppe