This is a working Google SSO Cypress Test. describe('Login', () => { it('Login through Google', () => { const username = Cypress.env('googleSocialLoginUsername') alert(username) const password = Cypress.env('googleSocialLoginPassword') const loginUrl = Cypress.env('loginUrl') const cookieName = Cypress.env('cookieName') const socialLoginOptions = { username: username, password: password, loginUrl: loginUrl, headless: true, logs: false, loginSelector: '[href="http://127.0.0.1:8000/auth/google"]', postLoginSelector: '.bg-scholarpath-500' } return cy.task('GoogleSocialLogin', socialLoginOptions).then(({cookies}) => { cy.clearCookies() const cookie = cookies.filter(cookie => cookie.name === cookieName).pop() if (cookie) { cy.setCookie(cookie.name, cookie.value, { domain: cookie.domain, expiry: cookie.expires, httpOnly: cookie.httpOnly, path: cookie.path, secure: cookie.secure })

Make sure this url matches the url for your google auth route. Also, postLoginSelector is a class on your "Log in with Google" button.

Add the following to your plugins/index.js file: const {GoogleSocialLogin} = require('cypress-social-logins').plugins module.exports = (on, config) => { on('task', { GoogleSocialLogin: GoogleSocialLogin })}
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners