Skip to content
Snippets Groups Projects
Commit ceccc3aa authored by Joe's avatar Joe
Browse files

Update README.md

parent 863b2ece
No related branches found
No related tags found
No related merge requests found
## Redmine omniauth google ## Redmine omniauth google
This plugin is used to authenticate in redmine through Google. This plugin is used to authenticate Redmine users using Google's OAuth2 provider.
### Installation: ### Installation:
Choose folder /plugins, make command Download the plugin and install required gems:
```console ```console
cd /path/to/redmine/plugins
git clone https://github.com/twinslash/redmine_omniauth_google.git git clone https://github.com/twinslash/redmine_omniauth_google.git
cd /path/to/redmine
bundle install
``` ```
Update gems and restart rails server. Restart the app
```console
touch /path/to/redmine/tmp/restart.txt
```
### Registration ### Registration
To make possible to authenticate via Google you must first to register application in Google To authenticate via Google you must first register your redmine instance via the Google Cloud Console
* Go to the [registration](https://code.google.com/apis/console) link. * Go to the [registration](https://cloud.google.com/console) link.
* Press "API Access" in left menu bar. * Click your Project's name
* Click the button "Create an OAuth 2.0 client ID". * Click "APIs & Auth"
* When registering specify application name, for example, Redmine Oauth Google. * Click "Registered Apps"
* In section "Your site or hostname" choose mode http, in the text input box enter your domain. For example: www.example.com or localhost * Click "Register App"
* Press the button "Create client ID". * Type a name for the application, e.g. "My Redmine"
* Select "Web Application" as the Platform
The registrations is complete. * Click "Register"
* Click "OAuth 2.0 Client ID"
* Enter "https://mydomain.com/redmine/oauth2callback", where "mydomain.com/redmine" is the domain / path for your redmine instance. *** The plugin will not work without this setting ***
* Click "Generate"
* Save the Client ID and Client Secret for the configuration of the Redmine plugin (see below)
### Configuration ### Configuration
To make plugin to work properly * Login as a user with administrative privileges.
* In top menu select "Administration".
* Click "Plugins"
* In plugins list, click "Configure" in the row for "Redmine Omniauth Google plugin"
* Enter the Сlient ID & Client Secret shown when you registered your application via Google Cloud Console.
* Check the box near "Oauth authentication"
* Click Apply.
* Login as administrator. In top menu select "Administration". Choose menu item Plugins. In plugins list choose "Redmine Omniauth Google plugin". Press "Configure". Users can now to use their Google Account to log in to your instance of Redmine.
* Fill Сlient ID & Client Secret by corresponding values, obtained by Google.
* Put the check "Oauth authentification", to make it possible to login through Google. Click Apply. Users can now to use apportunity to login via Google.
Additionaly Additionaly
* Setup value Autologin in Settings on tab Authentification * Setup value Autologin in Settings on tab Authentification
### Other options ### Other options
By default, all domains are allowed to authenticate through Google. By default, all user email domains are allowed to authenticate through Google.
To limit login through Google for other domains you have to fill allowed domains in the text box field the "Allowed domains". Domains must be separated by newlines. For example: If you want to limit the user email domains allowed to use the plugin, list one per line in the "Allowed domains" text box.
For example:
```text ```text
onedomain.com onedomain.com
otherdomain.com otherdomain.com
``` ```
### Work process With the above configuration, only users with email addresses on the domains "onedomain.com" and "otherdomain.com" will be allowed to acccess your Redmine instance using Google OAuth.
### Authentication Workflow
1. An unauthenticated user requests the URL to your Redmine instance.
2. User clicks the "Login via Google" buton.
3. The plugin redirects them to a Google sign in page if they are not already signed in to their Google account.
4. Google redirects user back to Redmine, where the Google OAuth plugin's controller takes over.
User goes to the login page (sign in) and clicks the button with Google image. The plugin redirects him to Google where user enters his the еmail & password from Google. Google redirects user back to plugins controller. Then the following cases: One of the following cases will occur:
1. If auto registration is enabled, user is redirected to 'my/page' 1. If self-registration is enabled (Under Administration > Settings > Authentication), user is redirected to 'my/page'
2. In other case user account is created and waited for admin activation 2. Otherwse, the an account is created for the user (referencing their Google OAuth2 ID). A Redmine administrator must activate the account for it to work.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment