Returning to an earlier question, we're working on writing end-to-end tests for our frontend application including social auth (this is an area that has broken frequently before). Do you test these integrations on your end, and what approach do you use? The problem we're running into is that GitHub issues challenges on "automated" log ins.
r
rp_st
08/30/2022, 12:27 PM
hey! There is no easy way to do these tests for providers like github / google etc.. they all have strict rate limits.
You can make network interceptors which mock replies from them, but then you aren't really doing an end to end test. But this should be good enough.
What we do is to run periodic manual tests on all the providers we support regularly + add automated tests using certain custom OAuth providers which don't have these rate limits.
m
Morgante Pell
08/30/2022, 3:14 PM
Do you have a recommended approach for mocking the backend when doing that?
Morgante Pell
08/30/2022, 3:15 PM
Or an example test? The redirect seems complicated to implement with mocks alone.
r
rp_st
08/30/2022, 3:19 PM
I don’t have any examples of mocking the backend for social providers unfortunately
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).