https://github.com/gldraphael/blazor-wasm-oidc-sample
https://github.com/gldraphael/blazor-wasm-oidc-sample
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gldraphael/blazor-wasm-oidc-sample
- Owner: gldraphael
- Created: 2025-02-17T16:15:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-18T17:15:39.000Z (over 1 year ago)
- Last Synced: 2025-06-26T12:51:51.414Z (about 1 year ago)
- Language: CSS
- Size: 820 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blazor WASM + Keycloak OIDC example
This is a sample to demonstrate long user sessions for Blazor WASM applications.
## Running this sample
```sh
docker compose build
docker compose up
```
This will expose the following services:
Service | Port
-----------|-------
`postgres` | `7571`
`keycloak` | `7572`
`wasmapp` | `7573`
Wait for the logs to settle down before proceeding.
## Setting up a keycloak user
1. **Login:** Log into keycloak with username `keycloak` & password `keycloak`.
1. **Switch realm:** Use the dropdown at the top-left corner to switch from the `master` realm to the `example` realm.
1. **Create user:** Click on Users → Add user and follow the steps to create a user.
1. **Create password:** Switch to the Credentials tab, click on Set Password, set a password.
## Testing the sample
1. Go to wasm-app at `http://localhost:7573`.
1. Click on the Login link, and login with the user created in the previous step.
1. Open developer tools and clear session storage, and refresh the page.
You will still remain logged in, as expected.