My app requires the following auth flow:
User gets redirected to a URL on my website. They login, grant access etc. In the end the get redirected back to the original URL, but in the query params there is specified a token and some extra information about the user. (Similar to how Spotify does it)
I looked over all the options for authentication on Zapier, but it seems like only Oauth has the option of redirecting to an external URL for authentication. How can I solve this problem?
Also, is there a way of unit testing the authentication?
Best answer by ikbelkirasanView original
I’ll let you know how it goes :)
To answer your question about unit testing authentication, check out the oauth2 example to see how that can be done https://github.com/zapier/zapier-platform-example-app-oauth2/blob/master/test/basic.js
I personally don't use mock servers. I only use node.js nock library to intercept requests and return whatever response I need in my tests. Hope this helps.
@halftome - I'm paging @ikbelkirasan for this one as they know their stuff when it comes to integrating stuff on Zapier.