zapier-platform icon indicating copy to clipboard operation
zapier-platform copied to clipboard

Session Authentication: Duplicate authentications performed (3 instead of 1)

Open thejamescollins opened this issue 4 years ago • 1 comments

Bug Description

Our App uses Session Authentication. When a user authenticates, the Zapier platform executes authentication.sessionConfig.perform three (3) times instead of once.

Reproduction Steps

  1. Go to https://zapier.com/app/connections and create a new connection for public app ID 67372 or private app ID 70879.
  2. Authenticate and enter a domain, username, and password.
  3. After successfully authenticating, review the logs and it shows 3 bundle authentication.sessionConfig.perform events, 2 seconds after each other: zapier logs --type=bundle --format=plain --detailed [email protected]

Here is the log output for app ID 70879 and user ID 4635944:

== Log
authentication.sessionConfig.perform
== Input
{"authData": {"domain": ":censored:30:d5fcd5d6a9:", "username": ":censored:9:2960792af1:", "password": ":censored:16:3b646f88c2:"}, "inputData": {}, "meta": {"isLoadingSample": false, "isFillingDynamicDropdown": false, "isTestingAuth": false, "isPopulatingDedupe": false, "limit": -1, "page": 0}}
== Output
{"consumerKey": "****", "consumerSecret": "****"}
== Version
2.0.2
== Timestamp
2020-04-21T16:01:40+08:00

 - - - - - - - - - - - - - - - - - -

== Log
authentication.test
== Input
{"authData": {"domain": ":censored:30:d5fcd5d6a9:", "username": ":censored:9:2960792af1:", "password": ":censored:16:3b646f88c2:", "consumerKey": ":censored:43:34657b4f1f:", "consumerSecret": ":censored:43:c4ea485299:"}, "inputData": {}, "inputDataRaw": {}, "meta": {"isLoadingSample": false, "isFillingDynamicDropdown": false, "isTestingAuth": true, "isPopulatingDedupe": false, "limit": -1, "page": 0}}
== Output
== Version
2.0.2
== Timestamp
2020-04-21T16:01:41+08:00

 - - - - - - - - - - - - - - - - - -

== Log
authentication.connectionLabel
== Input
.......snip.......
== Output
":censored:30:d5fcd5d6a9:"
== Version
2.0.2
== Timestamp
2020-04-21T16:01:42+08:00

 - - - - - - - - - - - - - - - - - -

== Log
authentication.sessionConfig.perform
== Input
{"authData": {"domain": ":censored:30:d5fcd5d6a9:", "username": ":censored:9:2960792af1:", "password": ":censored:16:3b646f88c2:", "consumerKey": ":censored:43:34657b4f1f:", "consumerSecret": ":censored:43:c4ea485299:"}, "inputData": {}, "meta": {"isLoadingSample": false, "isFillingDynamicDropdown": false, "isTestingAuth": false, "isPopulatingDedupe": false, "limit": -1, "page": 0}}
== Output
{"consumerKey": "****", "consumerSecret": "****"}
== Version
2.0.2
== Timestamp
2020-04-21T16:01:44+08:00

 - - - - - - - - - - - - - - - - - -

== Log
authentication.test
== Input
{"authData": {"domain": ":censored:30:d5fcd5d6a9:", "username": ":censored:9:2960792af1:", "password": ":censored:16:3b646f88c2:", "consumerKey": ":censored:43:fdde762b55:", "consumerSecret": ":censored:43:8d55cbb506:"}, "inputData": {}, "inputDataRaw": {}, "meta": {"isLoadingSample": false, "isFillingDynamicDropdown": false, "isTestingAuth": true, "isPopulatingDedupe": false, "limit": -1, "page": 0}}
== Output
== Version
2.0.2
== Timestamp
2020-04-21T16:01:46+08:00

 - - - - - - - - - - - - - - - - - -

== Log
authentication.sessionConfig.perform
== Input
{"authData": {"domain": ":censored:30:d5fcd5d6a9:", "username": ":censored:9:2960792af1:", "password": ":censored:16:3b646f88c2:", "consumerKey": ":censored:43:fdde762b55:", "consumerSecret": ":censored:43:8d55cbb506:"}, "inputData": {}, "meta": {"isLoadingSample": false, "isFillingDynamicDropdown": false, "isTestingAuth": false, "isPopulatingDedupe": false, "limit": -1, "page": 0}}
== Output
{"consumerKey": "***", "consumerSecret": "***"}
== Version
2.0.2
== Timestamp
2020-04-21T16:01:48+08:00

 - - - - - - - - - - - - - - - - - -

== Log
authentication.test
== Input
{"authData": {"domain": ":censored:30:d5fcd5d6a9:", "username": ":censored:9:2960792af1:", "password": ":censored:16:3b646f88c2:", "consumerKey": ":censored:43:7b1aa1555c:", "consumerSecret": ":censored:43:7305bb6c59:"}, "inputData": {}, "inputDataRaw": {}, "meta": {"isLoadingSample": false, "isFillingDynamicDropdown": false, "isTestingAuth": true, "isPopulatingDedupe": false, "limit": -1, "page": 0}}
== Output
== Version
2.0.2
== Timestamp
2020-04-21T16:01:50+08:00
  1. 9 minutes later, I then started creating a new Zap using the single authentication saved in my account, and the Zapier plaform then performed another session perform and test, when I expected it to just do a test only:
== Log
authentication.sessionConfig.perform
== Input
{"authData": {"domain": ":censored:30:d5fcd5d6a9:", "username": ":censored:9:2960792af1:", "password": ":censored:16:3b646f88c2:", "consumerKey": ":censored:43:7b1aa1555c:", "consumerSecret": ":censored:43:7305bb6c59:"}, "inputData": {}, "meta": {"isLoadingSample": false, "isFillingDynamicDropdown": false, "isTestingAuth": false, "isPopulatingDedupe": false, "limit": -1, "page": 0}}
== Output
{"consumerKey": "***", "consumerSecret": "***"}
== Version
2.0.2
== Timestamp
2020-04-21T16:10:41+08:00

 - - - - - - - - - - - - - - - - - -

== Log
authentication.test
== Input
{"authData": {"domain": ":censored:30:d5fcd5d6a9:", "username": ":censored:9:2960792af1:", "password": ":censored:16:3b646f88c2:", "consumerKey": ":censored:43:bacb04b76a:", "consumerSecret": ":censored:43:156e3d97a1:"}, "inputData": {}, "inputDataRaw": {}, "meta": {"isLoadingSample": false, "isFillingDynamicDropdown": false, "isTestingAuth": true, "isPopulatingDedupe": false, "limit": -1, "page": 0}}
== Output
== Version
2.0.2
== Timestamp
2020-04-21T16:10:42+08:00

The end result is that a single authentication is saved in my Zapier account, however, our WooCommerce store has 4 keys and secrets created because the Zapier platform performed the authentication 4 times instead of once.

Version Info

  • Version info: zapier-platform-cli/9.1.0 darwin-x64 node-v10.16.3
  • Operating System:
  • App id: 67372 (public app) and also private invite only app id 70879

thejamescollins avatar Apr 22 '20 04:04 thejamescollins