This plugin is used to authenticate Redmine users using OAuth2 provider ("Authorization Code" grant type). It is primarily intended to work with GitHub.
Version of Redmine: 3.4.X (as of publish date, other versions should work as well)
- login
- logout
- Download the plugin and install required gems:
cd /path/to/redmine
git clone -b master https://github.com/gpstogis/redmine_oauth2_login.git ./plugins/redmine_oauth2_login
rm -rf ./plugins/redmine_oauth2_login/.git ./plugins/redmine_oauth2_login/test
bundle install --without development test
- Restart the app
touch /path/to/redmine/tmp/restart.txt
- Login as a user with administrative privileges.
- In top menu select "Administration".
- Click "Plugins"
- In plugins list, click "Configure" in the row for "Redmine OAuth2 Login plugin"
- Check the box near "OAuth2 Authentication"
- Enter OAuth2 Authentication provider URL
- Enter the Сlient ID & Client Secret (see more here).
- Click Apply.
Users can now use their GitHub Account to log in to your instance of Redmine.
- An unauthenticated user requests the URL to your Redmine instance.
- User clicks the "Login via ..." buton.
- The plugin redirects them to GitHub sign in page if they are not already signed in to their GitHub account.
- GitHub redirects user back to Redmine, where the GitHub OAuth plugin's controller takes over.
This plugin overrides Redmine's autoregistration feature so user is created automatically if all required fields are provided (login, firstname, lastname, email). Uniqueness of user is checked against login.