- ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
- Rails 5.1.6
- gem 'keycloak', '~> 3.0.0'
This is a simple example of how to build an application using gem Keycloak and using the views from your own application.
1. Clone this project $ rails generate active_record:session_migration
$ rake db:migrate
$ vim config/initializers/session_store.rb Rails.application.config.session_store :active_record_store, :key => '_my_app_session'
2. Create a new realm:
3. Configure a email to send then "forgot password" email:
4. Create a new client in the realm:
5. Create a new role in the client:
6. Export installation.json file and paste in application folder. The gem will get client information at this file.:
7. Install application gems:
$ bundle
8. Create database:
$ rails db:create
$ rails db:migrate
9. Start application:
$ rails s
11. See the new user in Keycloak:
12. Sign In and access the main screen:
13. Click in "Logout":
In docs folder there are the realm file exported and all images of this documentation.