Hey Guys is there a way to make a automated authentication to get cookies before running my api integration test before deployment ?
Hi Alex. I'll need to refer this one to the team.
Can you tell me what SDK/framework you are using, and the version. Will help me identify the right person to ask.
An initial response to this is - you can use Postman (or similar) to generate a token before testing. See this doc. Does this cover your needs?
Hi here's the answer from one of our senior devs.
Unfortunately, for authentication using PKCE or Authorisation Code, you need a browser to enter credentials to obtain an access token.What I can do right now is raise this with our product manager, and add your voice to the existing requests (Squeaky wheel and all that). I can come back to you if it looks like we're able to prioritize it. But do ask again if you don't hear anything.
In a CI/CD job, the only way to achieve that would be to have a headless browser running. which is notoriously unstable.
ForClient Credentials grants
(machine to machine), no browser is required, so that's fine to do in a CI/CD job.
I believe a few other customers have asked for an access token that represents a Kinde end-user they can use for testing. We probably need to build something similar to what Auth0 have.
Hey ,
Its me the Product Manager here (Claire's squeaky wheel worked).
I would love to know more about your authentication setup and ideal testing logic you want to implement in your CI/CD.
I have a few questions:
Hi
Thank you for reaching out!
Regarding your questions:
Hey ,
Apologies for the delayed response here.
Thanks for elaborating on your use-case.
Are you able to let me know the authentication methods shown to your users when authenticating with your platform?
Thanks for the quick reply Alex.
I will discuss this with my team and get back to you by the end of the week.
Hey ,
Just letting you know we are still discussing your use-case internally.
I will continue to update you when I have more information.
Are you currently blocked by this?
Hey
thanks for the update
actually all ci tests are now failing due to this token
so its a key feature for us currently!
thank you
Hey Alex,
I understand this is blocking you, sorry to hear this.
I am still discussing this with my team.
We are exploring ways to solve your CI/CD test use-case.
I will get back to you when I have more info.
Hey ,
A few other customers have implemented tests with Kinde using playwright by establishing an offline session for a user via the one-off in-browser sign-in, with use of the refresh tokens.
I would suggest having a read of this doc and letting me know if this solves your use-case.