-
Hello, I'm trying to implement E2E test integration using Cypress. Cypress does not recommend testing third-party applications and even cannot actually for the moment have a test where multiple domains are used, so with the OAuth2 flow in mind, it makes login impossible. I'm looking for a way to get the access token without the OAuth2 flow (authorization_code grant), I would like to use instead the password grant flow but it is unavailable in Hydra (for example with OAuth0 service it looks like that https://auth0.com/blog/end-to-end-testing-with-cypress-and-auth0/) Still is it possible to get the private key used for the access token generation and generate the access token myself? Thanks a lot for your help |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
So from my past experience independent of Ory and in combination with my last experience with cypress-testing, i'd suggest to implement different authentication-schemes in your application. If hydra is currently your only one then maybe "None" might be a valuable other one. I think this is useful for development (increasing efficiency of developers) but also testing, especially if you explicitely don't want to test all your'third-party depenendencies. Just a couple of years ago, security people might consider that as some sort of "unsecure" but seriously: How many configuration-params are different on prod than on other environments? If one can't control that on prod, one should probably not run prod at all. Sure, you also should test all the ory-specific processes, but i'd separate them from the other stuff. E.g. you could consider testing it in production every hour WITH the OAuth2-flow? But i don't have good tips on how to do that on practice. I Will do some research here! Also, other opinions highly welcome! |
Beta Was this translation helpful? Give feedback.
So from my past experience independent of Ory and in combination with my last experience with cypress-testing, i'd suggest to implement different authentication-schemes in your application. If hydra is currently your only one then maybe "None" might be a valuable other one. I think this is useful for development (increasing efficiency of developers) but also testing, especially if you explicitely don't want to test all your'third-party depenendencies.
Just a couple of years ago, security people might consider that as some sort of "unsecure" but seriously: How many configuration-params are different on prod than on other environments? If one can't control that on prod, one should probably …