iqbmo04 / todos

demonstrate how to sign in using google account with playwright

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Todos

This project contains a small authenticated app using google login. Playwright is used to run e2e test

Requirements

Configure firebase

  • install firebase cli

     npm install -g firebase-tools
    
  • create a firebase project

Create a firebase project here

  • reset the firebase config in the project

    npx ng add @angular/fire
    

Accept all the selections and select the project that was created in the previous step. A quick look in app.module.ts can help see if the schematic worked well.

configure firebase authentication

In firebase console, select google identity provider

install dependencies

npm ci

Run project

npm start

Playwright

Configure oauth credentials

Please follow the instructions here to get google credentials and create a file .env at the root of the project with the following:

CLIENT_ID="xxx"
CLIENT_SECRET="xxx"
REFRESH_TOKEN="xxx"

run playwright tests

npx playwright test

About

demonstrate how to sign in using google account with playwright


Languages

Language:TypeScript 85.9%Language:JavaScript 9.9%Language:HTML 3.6%Language:SCSS 0.6%