Skip to content

Commit 95afe09

Browse files
committed
update usage
1 parent bddd7ed commit 95afe09

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@ gem 'omniauth-marvin', github: "fakenine/omniauth-marvin"
1212

1313
## Usage
1414

15-
TODO: Write usage instructions here
15+
Register your application on 42's intranet to receive an API Key.
16+
17+
Here's an example for adding the middleware to a Rails app in `config/initializers/omniauth.rb`
18+
19+
```ruby
20+
Rails.application.config.middleware.use OmniAuth::Builder do
21+
provider :marvin, ENV["42_ID"], ENV["42_SECRET"]
22+
end
23+
```
24+
25+
You can now access the OmniAuth 42 OAuth2 URL: `/auth/marvin`
1626

1727
## Licence
1828

0 commit comments

Comments
 (0)