Google Identity And OpenID Connect On Cloud Run Part 2

Dev Thakkar
Dec 13, 2021

Continued from Part 1

Scenario: For pricestats application authenticate user with Google Identity

Step 4: Test Local

#Run below commands> python -m venv env>  env\Scripts\activate.bat#start app.py>  python app.py
  • After server start open browser localhost:8080 and click on Login
After successful login the user is redirected to homepage

Step 5: Deploy to Cloud Run

  • Install Cloud Code extension in VS Code
  • From VS Code Command Palette Select => Cloud Code : Deploy to Cloud Run
  • Complete as below
(1) Service* will be empty for initial run. Cloud Run will create a new service (b) Include service account “secretconnect@pricestats.iam.gserviceaccount.com” for access to Secret Manager
  • Click on Deploy to continue
  • Above step will (a) build application Docker image and store in google container register (b) Deploy container to Cloud Run server [pricestats]
  • After App Deploy, open target url in browser

Step 6: Delete the project along with all resources (optional)

gcloud projects delete pricestats

--

--