#!/usr/bin/env python3 import httpx from fastapi import Form, HTTPException from fastapi.responses import RedirectResponse from nicegui import app, ui # Get your Google Client ID from the Google Cloud Console. # For local development, you should add http://localhost:8080 to the authorized JavaScript origins. # In production, you should add the domain of your website to the authorized JavaScript origins. # See https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid#get_your_google_api_client_id. GOOGLE_CLIENT_ID = '484798726913-t4es9ner8aglom3miptbnq1m23dsqagi.apps.googleusercontent.com' @ui.page('/') def main_page() -> None: user_data = app.storage.user.get('user_data', None) if not user_data: ui.add_head_html('') ui.html(f'''