Giter Site home page Giter Site logo

Comments (8)

prewk avatar prewk commented on August 19, 2024 1

I tried forking and fixing it, but for some weird reason I can't push to my fork! Never happened to me before, so I'm at loss here.. anyway, the solution I was going for was allowing kcLogin to take either the string it's taking today or a UserData object, and then doing a typeof user === 'string' check.

So the signature would change to kcLogin(user: string | UserData): Chainable<KcTokens>;

I don't know enough about Cypress or keycloak to be confident about that solution, however, and the tests in this package just sat around and failed to start so 🤷 hehe..

(Btw, is kcLogin really returning Chainable<KcTokens>..? Is Cypress solving that, because it seems to be missing a return on src/kc-login.ts:6 and src/kc-login.ts:11 but then again, I don't know much about Cypress)

from cypress-keycloak-commands.

bethaniala avatar bethaniala commented on August 19, 2024 1

We're not using this plugin yet, because we would have to store the user credentials in git without encryption. It would be great if we had the flexibility of passing the username and password directly to kcLogin. This way we could store them in env variables or store them encrypted in git and decrypt them before calling kcLogin.

from cypress-keycloak-commands.

rm3l avatar rm3l commented on August 19, 2024 1

We had similar concerns, so I opened #32 as a new PR before just seeing this open issue :-)

@prewk I thought about the same approach you mentioned to handle both types :-)

Hopefully the PR gets merged soon.

Meanwhile, if anyone wants to give it a try, feel free to point to the fork I created, by updating your package.json file :

"cypress-keycloak-commands": "rm3l/cypress-keycloak-commands#distrib",

from cypress-keycloak-commands.

prewk avatar prewk commented on August 19, 2024 1

Cool, I can't promise I have the time to try it atm due to stuff but awesome work!

from cypress-keycloak-commands.

jdtully avatar jdtully commented on August 19, 2024

I ran into this problem as well, and separating the credentials from the repo is on my Issues list. It would be nice if the package was updated to work with .env as I DO have Cypress.env working beside for the credentials

from cypress-keycloak-commands.

jdtully avatar jdtully commented on August 19, 2024

Any movement on this?

from cypress-keycloak-commands.

jdtully avatar jdtully commented on August 19, 2024

any movement on this repo?

from cypress-keycloak-commands.

prewk avatar prewk commented on August 19, 2024

This package is pretty solid: https://github.com/babangsund/cypress-keycloak

from cypress-keycloak-commands.

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.