Comments (11)
Sorry for Hijacking this issue but it didn't seem to make sense to create a new issue. In my project I did get an error about a client_secret. I've added it to a PR here #15
I've also ran the test of this project agains Keycloak 9 and 10
from cypress-keycloak-commands.
@Fredx87 Any ETA on this issue and the PR? Would love to use this soon. Otherwise I might have to resort to using my own fork but I don't really want to publish it myself if the PR could get merged
from cypress-keycloak-commands.
I tried installing the patch using
npm install 'github:Shuyinsama/cypress-keycloak-commands#feature/add-client-secret-to-kclogin-command'
but node_modules/cypress-keycloak-commands/ is missing some files. The directory only contains:
index.d.ts LICENSE package.json README.md
and is missing the dist directory with the files
utils.js kc-logout.js kc-login.js kc-fake-login.js index.js
Also, cypress gives me the error:
Error: Can't walk dependency graph: Cannot find module 'cypress-keycloak-commands' from '/.../cypress/support'
required by /.../cypress/support/commands.js
from cypress-keycloak-commands.
@RoadRunner- Could you create a pull request, so that there's a chance to get this feature. I also need this fix and have to patch manually :-(
I've also seen a fork where this patch seems to be integrated: https://github.com/maknifirasing/cypress-keycloak-commands
from cypress-keycloak-commands.
Thank you for the PR, I will review it asap.
Anyway, I don't get what is the use case of passing the client secret in the "emulated" login of this plugin. The client used by the web application under test (and therefore by this plugin) should be a public client without secret, for security reasons. Quote from the keycloak documentation:
One important thing to note about using client-side applications is that the client has to be a public client as there is no secure way to store client credentials in a client-side application. This makes it very important to make sure the redirect URIs you have configured for the client are correct and as specific as possible.
from cypress-keycloak-commands.
Hi @Fredx87. In my case I need to set the secret because my backend communicates with keycloak. My frontend does not know about keycloak and is only secured by a spring boot application. There it's recommended to use a client secret.
Great to see the functionality added! π
from cypress-keycloak-commands.
@Fredx87 Thank you for your reply.
I will await your review and will work with you to adhere your guidelines so we can try and get this merged.
As @awallat mentions above me, our use case is also actually a spring boot application where the client_secret is recommended. Our frontend does not know of any Keycloak instance
from cypress-keycloak-commands.
Hello, I am also affected.
from cypress-keycloak-commands.
I'm having the same problem @RubenGarcia is having.
FFS guys, approve this!
from cypress-keycloak-commands.
Same for me, that s also blocking point for us
from cypress-keycloak-commands.
@RubenGarcia @KarmaCop213 & @smetsboris installing it that way doesnβt cut it, take a look at this article: https://dev.to/dannyaziz97/how-the-hell-do-i-use-my-forked-npm-package-4pei
TL;DR
Add this to you package.json
"scripts": {
...
"postinstall": "cd ./node_modules/cypress-keycloak-commands && npm install && npm run build"
}
from cypress-keycloak-commands.
Related Issues (20)
- 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
- Is the static user fixture a requirement? HOT 8
- 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.