Giter Club home page Giter Club logo

Comments (4)

chaixdev avatar chaixdev commented on July 29, 2024 1

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.

mauriciovigolo avatar mauriciovigolo commented on July 29, 2024

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.

mauriciovigolo avatar mauriciovigolo commented on July 29, 2024

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.

deniztoprak avatar deniztoprak commented on July 29, 2024

@chaixdev you can also convert promises to observables with rxjs's From operator:

const observable = from(promise);

from keycloak-angular.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.