Using cypress for Supabase with an External provider Google #22593
Replies: 4 comments
-
|
+1 for this question, I have also not been able to write an e2e test using cypress for a google based sign in/up flow. |
Beta Was this translation helpful? Give feedback.
-
|
+1 as well except I am using Discord OAuth through Supabase. Should be fairly similar though. |
Beta Was this translation helpful? Give feedback.
-
|
Still trying to find a solution for this (in 2024!) |
Beta Was this translation helpful? Give feedback.
-
|
As this is really old, has anyone ever tried to just intercep the outgoing request to google to verify that the google oauth setup works? Just test what you expect to happen - get the URL that is being called when clicking on your google login, make your test pass. Intercept and return mock-data. You can extend this up to any point you like, e.g. response mock data includes information which is then being used in your app to redirect your users, etc. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I am trying to build an e2e test with authentication by 3rd party service Supabase(with external provider Google)
The first issue that I had it's
Blocked a frame with originThat is partially handled with the setting:Partially because it does not work for all the chrome versions... It's fine with Linux chrom, but not working on Windows.
Is there any list of chrome browser versions that it supports?
After that, I changed the user agent to be like a real browser. It allowed me to be passed to a Google sign-in page.
The next issue that I cannot handle is that google says to me that my cookies are disabled. But I can get cookies from google analytics, but not on a sign-in page.
Does anyone try to implement a full sign flow with google?
The only way how to deal with it is to use another library for example playwright to create a command that can execute this flow. it will return me an access token that I will apply directly to localStorage.
But this approach doesn't look good to me. Is there any ability to write a full test with sign in with Google?
Beta Was this translation helpful? Give feedback.
All reactions