Skip to content

Simple example of combining Django + React + Keycloak

License

Notifications You must be signed in to change notification settings

stamolo/django-react-keycloak

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django + React + Keycloak Example

This repository shows bare minimum for integrating keycloak with Django and React

Note that this is just an example, source code is not in the best shape

Prerequisites

  • Docker and docker-compose

Running

  • Run docker-compose up

Configuring Keycloak

  • Open localhost:8080
  • Open Administration Console and login with default admin credentials
    • Login: admin Password: admin
  • Open Realm settings (found at bottom left)
  • Set Frontend URL to http://localhost:8080
    • Save
  • Open Clients (found at top left)
  • Click on Create client
  • Put Client ID as react
  • Click Next until you see Root URL option
  • Set Root URL to http://localhost:5173/
  • Click Save
  • Open Clients (found at top left)
  • Click on Create client
  • Put Client ID as backend
  • Click Next until you see Root URL option
  • Set Root URL to http://localhost:8000/
  • Click Save

Adding Registration

  • Open localhost:8080
  • Open Administration Console and login with default admin credentials
  • Open Realm settings (found at bottom left)
  • Click on Login tab
  • Turn on User registration

Now you are ready to open http://localhost:5173 to play with React app

About

Simple example of combining Django + React + Keycloak

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 53.8%
  • Python 41.6%
  • HTML 2.6%
  • Other 2.0%