Tool to automate the OAuth 2.0/OIDC flows
Find a file
2024-02-23 16:03:31 -07:00
bin Added build script 2024-02-21 17:53:50 -07:00
cmd Added access token fetching 2024-02-22 10:57:39 -07:00
internal Added access token fetching 2024-02-22 10:57:39 -07:00
.gitignore Fixed login file name and added to .gitignore 2024-02-21 17:56:32 -07:00
go.mod Added ability to get authorization code 2024-02-21 20:26:25 -07:00
go.sum Added ability to get authorization code 2024-02-21 20:26:25 -07:00
main.go Added CLI and more functionality 2024-02-21 17:51:59 -07:00
README.md Updated README.md 2024-02-23 16:03:31 -07:00

OIDC Provider Authentication/Authorization Login (OPAAL)

This is a small, simple, experimental OIDC login helper tool that automates the authorization code flow defined by RFC 6749 for social sign-in with identity providers like Google, Facebook, or GitHub. This tool is made to work when your issuer/identity provider is separate from your authorization server.

Note: This tool acts as an OAuth client, contains client secrets, and should not be exposed to users!

Build and Usage

Clone the repository and build:

git clone https://github.com/davidallendj/opal.git
cd opal/
go mod tidy && go build

To use this tool, you will have to register an OAuth2 application with you identity provider. Make sure you register the application first before proceeding, then set the callback URL to {your host}/oauth/callback.

To get started with the authentication flow, run the following commands:

./oidc config ./config.yaml
./oidc login --config config.yaml

These commands will create a default config, then start the login process. Initially, you'll have to click on the link created based on you configuration, login with your IdP, then authorize the client to within the set scope.