I am struggling to understand how to authenticate via oauth2 in testing with Zapier CLI.
Initially I was using Platform UI and was able to authenticate via oauth2 just fine. Then I found a need to swap to CLI and have had issues with oauth2.
The issue seems to be 2 things:
- When visiting my website to authorise the oauth2 I have to log in via session so that my website knows which user account to authorise for oauth2. How do I authenticate in tests? I can’t work out a way of authenticating first and then continuing with the oauth2 flow. This is particularly confusing as in production I won’t need to authenticate first as this will be already done by the session cookie.
- Even if I can get the tests to authenticate first. How then do I authorise the oauth2? On my website you have to click a button to accept the authorisation. How is this done in tests?