Social login using your personal Google or Google Gsuite account is a common use case for many login scenarios.Documentation Index
Fetch the complete documentation index at: https://checkly-422f444a-sync-playwright-reporter-changelog-v1-5-0.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Steps
- We start at a site that offers Google as an authentication provider. In this case we use Stack Overflow.
- We fetch the login page and click the “Login with Google” button.
- We are redirect to Google.
- We provide the username and password, injected by using environment variables.
- We are redirected back to the starting.
google-login.spec.ts
This example does not work when you have 2-factor authentication enabled, and you might trigger a recaptcha check.
Takeaways
- Use environment variables to inject secrets.
- Waiting for the navigation as you are redirected to Google is done automatically.
- Waiting for the navigation as you are redirected back to the start site is done automatically.
Bugs don’t stop at CI/CD. Why would Playwright? 
Sign up and start using Playwright for end-to-end monitoring with Checkly.