View Source README
rumble-has-broken-api-docs-this-was-grokked-via-locals-com-requests-there-may-be-dragons-maybe-they-need-to-hire-me-to-fix-the-mess
Rumble has broken api docs, this was grokked via locals.com requests, there may be dragons, maybe they need to hire me to fix the mess.
Rumble Oauth
Rumble OAuth2 strategy for Überauth/Assent.
installation
Installation
Setup your application at Rumble Developers.
Add
:ueberauth_rumble
to your list of dependencies inmix.exs
:def deps do [{:oauth2_rumble, ">= 0.0.0"}] end
Add the strategy to your applications:
def application do [applications: [:oauth2_rumble]] end
Add Rumble to your Überauth configuration:
config :ueberauth, Ueberauth, providers: [ oauth2_rumble: {Rumble.Strategy.Ueberauth, []} ]
Update your provider configuration:
config :ueberauth, Rumble.Strategy.OAuth2, client_id: System.get_env("RUMBLE_CLIENT_ID")
Include the Überauth plug in your controller:
defmodule MyApp.AuthController do use MyApp.Web, :controller plug Ueberauth ... end
Create the request and callback routes if you haven't already:
scope "/auth", MyApp do pipe_through :browser get "/:provider", AuthController, :request get "/:provider/callback", AuthController, :callback end
And make sure to set the correct redirect URI(s) in your Rumble application to wire up the callback.
Your controller needs to implement callbacks to deal with
Ueberauth.Auth
andUeberauth.Failure
responses.
For an example implementation see the Überauth Example application.
calling
Calling
Depending on the configured url you can initialize the request through:
/auth/rumble
You must use something other than Rumble in the callback routes, I use /auth/td see below:
config :ueberauth, Ueberauth,
providers: [
rumble: {Ueberauth.Strategy.Rumble, [request_path: "/auth/rumble", callback_path: "/auth/rumble/callback"]}
]
phoenix-integration
Phoenix Integration
if you have phoenix installed you can import Rumble.Oauth2.Components.Core and call the login button in your view
license
License
Please see LICENSE for licensing details.