https://github.com/rewindio/omniauth-azure-devops
Authenticate using the Azure Devops OAuth2 API.
https://github.com/rewindio/omniauth-azure-devops
jira--pe
Last synced: 12 months ago
JSON representation
Authenticate using the Azure Devops OAuth2 API.
- Host: GitHub
- URL: https://github.com/rewindio/omniauth-azure-devops
- Owner: rewindio
- License: mit
- Created: 2023-09-22T17:01:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-10T13:32:02.000Z (about 1 year ago)
- Last Synced: 2025-07-11T06:50:05.084Z (about 1 year ago)
- Topics: jira--pe
- Language: Ruby
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# OmniAuth Azure DevOps Strategy
OmniAuth Azure DevOps is a Ruby gem that provides authentication for your Ruby applications via the Azure DevOps OAuth 2.0 authentication system.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'omniauth-azure-devops'
```
And then execute:
```bash
bundle install
```
## Usage
1. Register your application with Azure DevOps to obtain the `AZURE_DEVOPS_CLIENT_ID` and `AZURE_DEVOPS_CLIENT_SECRET` credentials.
2. In your application configuration, add the following line to use the Azure DevOps OmniAuth strategy:
```ruby
provider :azure_devops, ENV['AZURE_DEVOPS_CLIENT_ID'], ENV['AZURE_DEVOPS_CLIENT_SECRET'], scope: 'vso.auditlog etc...', callback_path: '/link/azure_devops/oauth_callback'
```
Replace `ENV['AZURE_DEVOPS_CLIENT_ID']` and `ENV['AZURE_DEVOPS_CLIENT_SECRET']` with your Azure DevOps client credentials.
3. Implement the necessary routes and views to initiate the authentication process and handle the callback.
4. When users access the authentication route, they will be redirected to Azure DevOps for authentication. After successful authentication, Azure DevOps will redirect them back to your specified callback URL.
5. Access user information and tokens as needed in your application by utilizing the OmniAuth authentication data.
## Running Tests
You can run the test suite using the following command:
```bash
rake spec
```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the spec. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`.
## Contributing
Bug reports and pull requests are welcome on GitHub at [https://github.com/rewindio/omniauth-azure-devops](https://github.com/rewindio/omniauth-azure-devops). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org) code of conduct.
## License
This gem is available as open-source software under the [MIT License](https://opensource.org/licenses/MIT).