Coder Social home page Coder Social logo

Comments (4)

jy95 avatar jy95 commented on August 23, 2024

Helllo @ddurham2

Indeed, having something as convenient as keycloak-angular would be nice for ionic developpment.
For the time being, it is up to the user to make the job :

I think a wrapper on top of keycloak-capacitor would be the best idea as :

  1. keycloak-capacitor can focus on providing adapters for Capacitor & keeping the same JavaScript adapter contract
  2. The wrapper can focus on providing the auto-refresh / ... behaviour many people seek

Ofc, I might be wrong : if you have any idea on how can we can provide both the adaptors and the Service, i'm open to your suggestions ;)

from keycloak-capacitor.

ddurham2 avatar ddurham2 commented on August 23, 2024

Ah okay.. I didn't see it, but wanted to make sure I wasn't missing something and didn't go to a bunch of trouble for no reason.

I think a workable approach would be to simply snatch and adjust the code from keycloak-angular itself (the licenses are compatible) since it appears to basically wrap keycloak-js and keycloak-capacitor offers a similar interface (no?).

Then, release this as keycloak-capacitor-angular w/ keycloak-capacitor as its dependency.

Do you think that approach might work?

I'm flying mostly blind here (a newbie) with the npm ecosystem and how to release/maintain modules, but I might give it a try.

from keycloak-capacitor.

jy95 avatar jy95 commented on August 23, 2024

The path keycloak-capacitor-angular with keycloak-capacitor as its dependency might work imo.

As you can see, keycloak-capacitor just adds two Capacitor-related adaptors ( capacitor / capacitor-native ) thus keeping keycloak-js interface. As process is automated, I don't get the unmaintained package fate keycloak-ionic got ..

For the story, keycloak-ionic was stuck on keycloak-js v13 & as you might guess, plenty of apps (including one in my daily job) somehow requires keycloak-js v18 or v19 because of some server upgrades ...

No worries, everyone was a newbie : whatever the ecosystem, the computer programming principles remains ;)
Because a picture is worth than thousands of words ...

typescript-nodejs-relationship-big-1680x780

from keycloak-capacitor.

ddurham2 avatar ddurham2 commented on August 23, 2024

Well, I don't know if you have any interest in this, but I think I have it working here: https://github.com/ddurham2/keycloak-capacitor-angular/tree/capacitorification

I forked keycloak-angular itself and then started making changes. Not a lot of modification required. I forked because that makes future merging from that original source more obviously-possible and easy.

I haven't tested it all, but I have a basic onLoad: 'check-sso' process working. It sets up the same as a service like it would in a typical angular web app. Token injection works too w/ a 3rdparty lib that make requests.

BTW- I haven't published it to npmjs yet, which would be my first. I'm not expecting this, but if you would have some use for it, and wanted to maintain it, I'm also happy to transfer the repo to you.

from keycloak-capacitor.

Related Issues (4)

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.