seratch / slack-edge

Slack app development framework for edge functions with streamlined TypeScript support
https://github.com/seratch/slack-edge-app-template
MIT License
87 stars 5 forks source link

Unexpected Behavior with SlackOAuthApp's stateStore, onStateValidationError, and callback Functions #3

Closed abc123931 closed 10 months ago

abc123931 commented 10 months ago

I have been using the stateStore setting in SlackOAuthApp and noticed some surprising behavior.

When the consume function returns false, I would expect the onStateValidationError function in the oauth options to get executed, which does occur as expected.

However, the process seems to proceed further than anticipated, and the callback function in the oauth options gets executed as well. Is this the intended behavior or could this possibly be a bug?

seratch commented 10 months ago

@abc123931 Thanks for reporting this and sorry that you ran into the silly bug 🤦

I just resolved it and shipped a new pathc version including the change. Note that the fix might miss something because I didn't have time to do manual tests now. Pleaset let me know if the issue still remains.