https://github.com/dadav/flask-with-keycloak
https://github.com/dadav/flask-with-keycloak
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/dadav/flask-with-keycloak
- Owner: dadav
- Created: 2022-04-02T17:33:06.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-03T10:18:36.000Z (about 4 years ago)
- Last Synced: 2025-02-06T16:58:41.304Z (over 1 year ago)
- Language: Python
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Authlib with keycloak
## how to run this
```bash
# start keycloak
podman run --rm -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:17.0.1 start-dev
# create a realm and export the variable
# example: realm=demo
KEYCLOAK_ISSUER="http://localhost:8080/realms/demo"
# create a client
# example: flaskapp
KEYCLOAK_CLIENTID=flaskapp
# set it to confidental, click on the authorization tab and export the variable
KEYCLOAK_SECRET=$secret
# set the redirection url to http://localhost:5000/callback
# and don't forget to set the registration of the realm to true, so you can
# create users
# additional: create a admin role and asign it to one user
# now just run the app
source ./venv/bin/activate
flask run
```