gauther

command module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

README

gauther

Basic Google OAuth2 implementation with Firestore persistence at global scale

Demo

https://gauther.default.knative.tech/

Setup

Knative URL

To avoid the kind of chicken and an egg situation we are going to first define the URL that your application will have when you publish it on Knative. Knative uses convention to build serving URL by combining the deployment name (e.g. gauther), namespace name (e.g. default), and the pre-configured domain name (e.g. knative.tech). The resulting URL, assuming you already configured SSL, should look something like this:

https://gauther.default.knative.tech
Google OAuth Credentials

In your Google Cloud Platform (GCP) project console navigate to the Credentials section. You can use the search bar, just type Credentials and select the option with "API & Services". To create new OAuth credentials:

  • Click “Create credentials” and select “OAuth client ID”
  • Select "Web application"
  • Add authorized redirect URL at the bottom using the fully qualified domain we defined above and appending the callback path:
  • https://gauther.default.knative.tech/auth/callback
  • Click create and copy both client id and client secret
  • CLICK OK to save

You will also have to verify the domain ownership. More on that here

Google Cloud Firestore

If you haven't used yet Firestore on GCP, you will have to enable it. You can find instructions on how to do it here

App Configuration

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