📅 2024-02-16 — Session: Developed and Tested Flask Application with OAuth

🕒 17:55–18:40
🏷️ Labels: Flask, Google Oauth, Testing, Deployment, Cloud Hosting
📂 Project: Dev
⭐ Priority: MEDIUM

Session Goal

The primary goal of this session was to develop, test, and deploy a Flask application with integrated Google OAuth for user authentication.

Key Activities

  • Testing Application for Exercise Loading and Display: A comprehensive checklist was used for both manual and automated testing of the application to ensure exercises are correctly loaded and displayed.
  • Running and Testing a Flask Application Locally: Instructions were followed to start a Flask application locally, set environment variables, and access specific routes.
  • Configuring Flask Development in VS Code: The session included running a Flask application in VS Code, focusing on the OAuth2 flow and implementing a sample User model using SQLAlchemy.
  • Adjusting Flask Application for CSV and JSON Data Management: Modifications were made to handle exercises using CSV files and record user interactions in JSON format.
  • Troubleshooting Flask-Session Import Error: Common causes and solutions for import errors related to flask_session were addressed.
  • Resolving Flask TemplateNotFound Error: Steps were taken to resolve the TemplateNotFound: login.html error by ensuring correct directory structure and file naming.
  • Integrating Google OAuth in Flask Applications: A step-by-step guide was followed to integrate Google OAuth for user authentication, including setup and implementation.
  • Setting Up Google OAuth for Flask Applications: Steps were outlined to create a Web application client ID for Google OAuth integration.
  • Hosting Flask Applications on Google Cloud Platform: Options for hosting on Google Cloud Platform were explored, including App Engine and Compute Engine.
  • Hosting Flask Applications on Google App Engine: The advantages and steps for hosting on Google App Engine were reviewed.

Achievements

  • Successfully tested and ran a Flask application locally with integrated Google OAuth.
  • Resolved common errors related to Flask-Session and template handling.
  • Configured the application for data management using CSV and JSON.
  • Explored hosting options on Google Cloud Platform.

Pending Tasks

  • Finalize deployment on Google Cloud Platform.
  • Conduct further testing for edge cases in OAuth integration.
  • Optimize application performance for cloud hosting.