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
Setup your application at Rumble Developers.
Add
:ueberauth_rumbleto your list of dependencies inmix.exs:def deps do [{:oauth2_rumble, ">= 0.0.0"}] endAdd the strategy to your applications:
def application do [applications: [:oauth2_rumble]] endAdd 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 ... endCreate 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 endAnd 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.AuthandUeberauth.Failureresponses.
For an example implementation see the Überauth Example application.
Calling
Depending on the configured url you can initialize the request through:
/auth/rumbleYou 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
if you have phoenix installed you can import Rumble.Oauth2.Components.Core and call the login button in your view
License
Please see LICENSE for licensing details.