Comments (8)
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.
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.
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.
Cool, I can't promise I have the time to try it atm due to stuff but awesome work!
from cypress-keycloak-commands.
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.
Any movement on this?
from cypress-keycloak-commands.
any movement on this repo?
from cypress-keycloak-commands.
This package is pretty solid: https://github.com/babangsund/cypress-keycloak
from cypress-keycloak-commands.
Related Issues (20)
- Add support for client-secret beside client-id HOT 11
- Token request not stubbed when running tests on production environment
- error: kcLogin: no location in response headers HOT 2
- kcFakeLogin stuck on redirecting HOT 2
- kcLogin: Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame. HOT 7
- Documentation typos should be fixed
- Cannot authenticate - No cookies being set HOT 1
- Chrome 87, Cookies and kcLogin HOT 2
- PKCE support HOT 4
- Error: self signed certificate in certificate chain
- Cross-Domain still an issue
- kcLogin no longer working since Chrome 94? HOT 8
- How do I get otp_secret and otp_credential_id?
- mock session-iframe instead of changing the frontend for runtime HOT 2
- Cannot read properties of undefined (reading 'replace')
- cy.kcFakeLogin is not a function HOT 2
- Cannot read properties of undefined (reading 'action') HOT 4
- Give the possibility to do not add a file for the user but specify it in the env variables HOT 1
- fakeLogin is not working with cypress 12 HOT 3
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 cypress-keycloak-commands.