Authenticate using OAuth2
This is a plugin intended for use in authenticating against Google. It uses OAuth2 authentication. In theory, it should work with other providers too. It currently replaces the existing HTTP authentication, however this is not strictly necessary and can be easily removed.
Requires the oauth2client Python module.
Released into the public domain. For specifics, please see http://unlicense.org/.
If you have any issues, create a new ticket.
Download the zipped source from here.
- Obtain a "client_secrets.json" file. The instructions below assume you are using Google OAuth2 authentication.
- Creating a new project here.
- Under "APIS & AUTH" click "Credentials" and then "Create new Client ID".
- Select "Web application".
- For redirect URI, set the path to your Trac project followed by oauth2callback, for example: https://example.com/trac/myproject/oauth2callback.
- Under the newly created client ID section, click "Download JSON".
- Drop the plugin in your plugins directory.
- In your configuration section, disable the http authentication. Then specify the location of "client_secrets.json":
[components] trac.web.auth.loginmodule = disabled [oauth2] secrets = /path/to/client_secrets.json
- Optionally, if you would like to restrict access to a particular Google Apps domain, add the following:
[oauth2] domain = my.google.apps.domain