GoogleCloudHostedService

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2025 License: MIT Imports: 11 Imported by: 0

README

Google Cloud Hosted Service Example

This example demonstrates how to host the OPGO service on Google Cloud Platform.

Features

  • Cloud Firestore: Uses Cloud Firestore to persist Issuer, Client, and signing key information.
  • Firebase Authentication: Leverages Firebase Authentication to manage user information.
  • Cloud Run: Deploys to Cloud Run to provide redundancy and handle high traffic.

Configuration

The following environment variables must be set:

  • PROJECT_ID: The ID of your Google Cloud project.
  • PORT: The port the service will listen on (default: 8080).
  • ISSUER: The issuer URL for the service.
  • FIREBASE_API_KEY: The API key for your Firebase project.
  • FIREBASE_AUTH_DOMAIN: The authentication domain for your Firebase project.

A default client is created with the following credentials:

  • Client ID: default
  • Client Secret: secret

The allowed origins are specified by the ISSUER environment variable.

Endpoints

The following endpoints are available:

  • /api/login: Login endpoint. Requires a Bearer token in the Authorization header.
  • /web: Static web files.
  • /api/config.json: Firebase configuration.
  • /: Static web files.

Login

The login process requires a Bearer token in the Authorization header. After successful authentication, the server returns either a redirect URL or HTML content.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址