View Source README

Hex Docs Hex.pm GitHub GitHub last commit (branch)

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

  1. Setup your application at Rumble Developers.

  2. Add :ueberauth_rumble to your list of dependencies in mix.exs:

     def deps do
       [{:oauth2_rumble, ">= 0.0.0"}]
     end
  3. Add the strategy to your applications:

     def application do
       [applications: [:oauth2_rumble]]
     end
  4. Add Rumble to your Überauth configuration:

     config :ueberauth, Ueberauth,
       providers: [
         oauth2_rumble: {Rumble.Strategy.Ueberauth, []}
       ]
  5. Update your provider configuration:

    config :ueberauth, Rumble.Strategy.OAuth2,
      client_id: System.get_env("RUMBLE_CLIENT_ID")
  6. Include the Überauth plug in your controller:

    defmodule MyApp.AuthController do
      use MyApp.Web, :controller
      plug Ueberauth
      ...
    end
  7. 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.

  8. Your controller needs to implement callbacks to deal with Ueberauth.Auth and Ueberauth.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.