login

command
v0.0.0-...-94da3d9 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 11 Imported by: 0

README

login

A web app that demonstrate an OAuth2 client login.

Prerequisites
  1. Tell Crossid about your app.
  2. Setup HTTPS reverse proxy (see below)
Setup HTTPS

To avoid security issues, this sample expects to be serves by HTTPS.

Let's use Caddy to route traffic from port 443 to 3005.

caddy reverse-proxy --from localhost:443 --to localhost:3005
Run the app
git clone https://github.com/crossid/crossid-go-samples && cd crossid-go-samples

# Replace with your crossid tenant and app details
go run login/*.go -issuer-url https://<tenant>.crossid.io/oauth2 --client-id=<client_id> --client-secret=<client_secret> --audience=myapp

Browser should be opened automatically, a successful login displays Access Token and ID Token.

New to Crossid? check out the get started guide

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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