Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brahmlower/oidc-auth-demo
Minimal web server using OIDC for authentication.
https://github.com/brahmlower/oidc-auth-demo
demo oidc rust sso
Last synced: 22 days ago
JSON representation
Minimal web server using OIDC for authentication.
- Host: GitHub
- URL: https://github.com/brahmlower/oidc-auth-demo
- Owner: brahmlower
- Created: 2023-07-29T21:13:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-29T22:22:52.000Z (over 1 year ago)
- Last Synced: 2024-10-10T20:48:37.100Z (about 1 month ago)
- Topics: demo, oidc, rust, sso
- Language: Rust
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Example OIDC Consumer
This is an example service that demonstrates using OIDC for authentication and getting profile details. It's only meant for local development, testing, and reference for future projects.
## Development
You'll need to configure an Google OIDC client application first.
Copy the example service config and update it with the details you've set for your OIDC application. Googles OIDC apps require that you set a domain to be redirected to, so you'll need to include that domain in your `/etc/hosts` file.
```
##
# Host Database
##127.0.0.1 example.com
``````shell
cp example.service.toml service.toml
```Now run the application:
```shell
cargo run
```Browse to `http://example.com:9090/`, and then you should be able to click "Login", be redirected to the google auth page to choose the account to use, and to allow the application. You'll then be redirected back to the exmaple site and should see your profile details.