Replies: 4 comments 2 replies
-
@naripok did you find a solution? |
Beta Was this translation helpful? Give feedback.
-
Bumping this - trying to do the same thing but can't find a good solution |
Beta Was this translation helpful? Give feedback.
-
@kiwicopple this has been hanging around for quite some time and it would be great if someone from your team could take a look! |
Beta Was this translation helpful? Give feedback.
-
This is a limitation with Google's OAuth flow. It is intentionally designed to prevent bots -- like your Cypress tests -- from using it. Unfortunately, there's not much that we as Supabase can do for this. |
Beta Was this translation helpful? Give feedback.
-
Hey guys!
I have a rather complex sign-in/sign-up/org-invitation use-case for my auth flow and I want to be able to test it e2e while covering the whole flow starting through any of the entry-points.
While there are ways to test a regular Google OAuth flow by using Google's playground and some refresh tokens, I can see no way to test it in an automated fashion while using Supabase.
The problem is that supabase doesn't seem to use the regular google's refresh/access tokens, so the stuff I get from the playground is useless. If I try and use a testing framework like Cypress to click through the OAuth flow, I won't get consistent results as google will ask for additional validations (phone, email, captcha) from time to time. Google also has many different oauth consent pages that differ from region to region, browser to browser, if the browser is headless or not, etc, so it breaks the expectation for the prop selectors used in the browser testing.
So, the question here is is how to do it. How to test Supabase Google Oauth flow in an automated fashion without ending up with flaky tests.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions