Sha256: 726395ff9d204c5bed01f56db302ed03f7607d8d1c8a7044d491f3ac3ca22856
Contents?: true
Size: 1.32 KB
Versions: 1
Compression:
Stored size: 1.32 KB
Contents
-1. Read about OmniAuth by Intridea: http://github.com/intridea/omniauth. 0. Obtain client_id and client_secret from Exvo. 1. Install exvo-auth gem or add it to your Gemfile. 2. Configure middleware(s). There are two middlewares. Usually you will need the "Interactive" one: ExvoAuth::Strategies::Interactive ExvoAuth::Strategies::NonInteractive Both middlewares need client_id and client_secret arguments. In Rails, the relevant line could look like this: config.middleware.use ExvoAuth::Strategies::Interactive, "client_id", "client_secret" 3. Add routes. The following comes from Rails config/routes.rb file: match "/auth/failure" => "sessions#failure" match "/auth/interactive/callback" => "sessions#create" match "/auth/non_interactive/callback" => "sessions#create" Failure url is called whenever there's a failure (d'oh). You can have separate callbacks for interactive and non-interactive callback routes but you can also route both callbacks to the same controller method like shown above. 4. Implement callback(s). Sample implementation: def create render :text => params[:auth].inspect end In short: you get params[:auth]. Do what you want to do with it: store the data, create session, etc. 5. Read the source, there are few features not mentioned in this README.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
exvo-auth-0.1.3 | README |