A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/cobot/omniauth_cobot below:

cobot/omniauth_cobot: OmniAuth strategy for Cobot

This gem provides an OmniAuth strategy for authenticating with Cobot.

Add the following to your Gemfile:

gem 'omniauth_cobot'
gem 'omniauth-rails_csrf_protection', '~>1.0.0'
``

Add the following as an initializer:

```ruby
Rails.application.config.middleware.use OmniAuth::Builder do
  provider :cobot, '<client_id>', '<client_secret>', scope: 'read write'
end

To authenticate a user against Cobot, send them to /auth/cobot.

If authenticating in the context of a Cobot space, e.g. if your app is inside an ifram on Cobot, pass the space's subdomain by sending the user to /auth/cobot/cobot_space_subdomain=<space-sudbomain>. This ensures users don't have to log in again for their space on Cobot when that space has a custom domain.

After the user completed the OAuth flow, they are redirected back to /auth/cobot/callback, which should be routed to a controller action.

In the controller action you have access to a variable request.env['omniauth.auth'] that looks like this:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4