Giter Site home page Giter Site logo

Comments (4)

pbklink avatar pbklink commented on August 16, 2024 2

@pamapa,

I personally do not think an Angular helper library is helpful. I think there is enough behaviour encapsulated in oidc-client-ts. If you put more into an angular helper library, then, in my opinion, you are starting to put application logic into the helper library and it starts doing 'magic' that the developer should really be aware of. For example:

  • all the routes (including the signin callback) should be in the router module,
  • the signin component callback component should be with other components,
  • an auth related service would really only wrap UserManager functions and it is probably better to use a session management service with wider scope,
  • it is important for developers to know that their application will start twice and structure their startup process accordingly.

What I think would be really helpful for Angular developers is:

  1. Rework the Angular sample application so it reflects how a typical Angular application would use oidc-client-ts.
    Currently it is structured as a test application where login is manually initiated and has no guards. It should be restructured to automatically login (probably using downloaded configuration) and use guards to ensure login cannot be bypassed. It should include error handling - including the application level error handling suggestions which come out of #251
  2. A medium like article stepping you through creating an Angular application which uses oidc-client-ts.
    This would be based on the sample Angular application above. Such an article would probably be easily found with internet searches when the appropriate search terms are used. I find these articles extremely helpful when learning new techniques and am very thankful that the authors created them.

While I am not interested in creating an Angular helper library, I could rework the Angular sample application as per above and start working on an article if you think that would be helpful.

from oidc-client-ts.

pamapa avatar pamapa commented on August 16, 2024

@pbklink interested?

from oidc-client-ts.

pamapa avatar pamapa commented on August 16, 2024

@pbklink i agree with you. lets go that path. Would be really cool if you bring the Angular sample to a "best practice" state.

from oidc-client-ts.

pamapa avatar pamapa commented on August 16, 2024

For the record: The Angular sample project can be found here.

from oidc-client-ts.

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.