-
Notifications
You must be signed in to change notification settings - Fork 1
HPI Login Configuration
By default, in development
environment HPI Login is running in test mode. When the HPI Login button is clicked, you will be logged in automatically with the user data defined in config/environment/development.rb
. You can change this to fit your needs.
For testing HPI Login, change the line OmniAuth.config.test_mode = true
in config/environment/development.rb
to OmniAuth.config.test_mode = false
. This disables OmniAuth test mode, so your request will be sent to the HPI OpenID Server.
To use HPI Login, you also need to register an openid client here.
Then edit your credentials via rails credentials:edit
.
Enter the data from the registered client:
hpi_openid:
client_id: my_client_id
client_secret: my_client_secret
redirect_uri: my_redirect_uri
In development when running on localhost, the redirect uri should be http://localhost:3000/users/auth/hpi/callback
.
If editing your credentials fails the first time, try deleting config/credentials.yml.enc
and rerunning rails credentials:edit
.
Then restart the server to reload the config files.