An open API service indexing awesome lists of open source software.

https://github.com/fillmore-labs/login-sample

Sample OAuth login with a knative service
https://github.com/fillmore-labs/login-sample

knative knative-serving kustomize oauth2

Last synced: 5 months ago
JSON representation

Sample OAuth login with a knative service

Awesome Lists containing this project

README

          

= OAuth Login Sample
:Author: Oliver Eikemeier
:Email:
:Date: 2023-05
:Revision: v0.1
:toc: macro

image:https://badge.buildkite.com/07b78f5bce141778254e21bac50edb376be3742c0da6b97b58.svg?branch=main[title="Buildkite build status",link=https://buildkite.com/fillmore-labs/login-sample]

toc::[]

== Purpose

A sample knative service to demonstrate logging in via an OAuth provider.

== Prerequisites

You will need:

- A Kubernetes cluster with Knative installed. See
"`https://knative.dev/docs/install/yaml-install/serving/install-serving-with-yaml/[Installing Knative Serving using YAML files]`".
- An OAuth provider (i.e. https://auth0.com/signup[Auth0]).
- A container registry where your cluster can pull from (i.e. https://hub.docker.com[Docker Hub]).
- https://go.dev[Go] to compile the program.
- https://ko.build[Ko] to build containers.
- https://github.com/mozilla/sops[sops] for secret handling.

== Running

=== Locally

[source,shell]
----
./run.sh
----

=== Production

[source,shell]
----
./deploy.sh
----

== Developing

This code is based on https://github.com/auth0-samples/auth0-golang-web-app[Auth0 - Go Web App].

== References

- https://www.oauth.com/oauth2-servers/server-side-apps/[Server-Side Apps]
- https://www.ietf.org/archive/id/draft-ietf-oauth-security-topics-22.html[OAuth 2.0 Security Best Current Practice]