frontend
frontend copied to clipboard
Replace keycloak.js with some OpenID library
We are using keycloak.js to authenticate the application, but it causes some undesired dependency. We should prefer to use protocol over service. In this case, it means that we should not be depending on the keycloak library, but implement the authentication using some OpenID library, so we can easily swap the authentication service behind the curtain.
Some interesting links:
- https://betweendata.io/posts/react-keycloak-authentication/
- https://github.com/bjerkio/oidc-react
- https://javascript.plainenglish.io/secure-react-spa-using-keycloak-with-openid-connect-a25e2ad51743
Some Keycloak alternatives (for tests):
- https://www.g2.com/products/keycloak/competitors/alternatives
https://www.npmjs.com/package/react-oidc-context