Comments (4)
hey @mauriciovigolo!
Thanks for taking the time to respond. I spent some more time with this code and i'm just feeling a little of the learning curve of angular, keycloak, and openid in general :) not an trivial topic to stroll into.
What you describe for v2.0 sounds very helpful, though at the moment I am perfectly content with using keycloak's login and user registration. keep up the good work!
edit: i had a description of an issue i had earlier, but it had nothing to do with your lib and i fixed it so i removed it...
from keycloak-angular.
Hello @chaixdev,
At the beginning the KeycloakService methods were returning observables, however I didn't see advantages for what the library was offering, as:
- The recommended way to load the KeycloakService is at the startup, using the APP_INITIALIZER token. Using this approach you will be sure that the keycloak instance is loaded and available to consume.
- The oauth login flow redirects the user to the Keycloak Server to finish the login process. As the user is logged in, the keycloak server redirects the user to the app again. The initializer function will be called again and the auth guard will check if the user is logged in. In this flow I don't see any advantages for observables.
A new version is planned to be released (v.2.0.0) and it will provide new functionalities for the cases when your app needs to have its own login and sign up pages. It will be an option for nativescript apps or angular webapps that you don't want to be redirected to the keycloak server. This new version will provide a new service and for this situation the methods will return observables.
The current KeycloakService will not be modified, the new service will be an extra class to support this cases.
What problems are you facing? Maybe I can help.
from keycloak-angular.
Hi @chaixdev,
If you need any other assistance you are welcome to post it, okay @chaixdev?
Thanks for your interest in this library.
from keycloak-angular.
@chaixdev you can also convert promises to observables with rxjs's From operator:
const observable = from(promise);
from keycloak-angular.
Related Issues (20)
- Support for Pure Function-Based Guards in Angular HOT 2
- Support for Keycloak v23 HOT 9
- The JSDoc for getToken states it calls updateToken if necessary, but it does not HOT 1
- How I would know when the session is expired? HOT 1
- Problem with KeycloakService in Angular 17 HOT 1
- KeycloakAuthGuard example HOT 4
- Server-side rendering (SSR) crash with 'Document not found' error in Keycloak-angular with Angular 17 HOT 10
- keycloakBearerInterceptorFn example HOT 1
- Login method locale is not changing the user locale when the user logs in
- angular crashes with check-sso
- Support KC 24.x.x HOT 6
- Catch sign out event or redirect to ssop event
- keycloak-angular - next version improvements HOT 1
- Bug in package.json version 15.2.0 HOT 3
- Keycloak setup for Single SPA angular Project
- HttpClient Interceptor not working HOT 1
- Configure updateToken minValidity in HTTP Interceptor
- Standalone bootstrap: withEnabledBlockingInitialNavigation() causes isLoggedIn() to return false in AuthGuard HOT 2
- Add setup instructions for standalone bootstrap
- Logout the user if he is idle
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keycloak-angular.