Popularity
6.9
Growing
Activity
0.0
Declining
70
4
46

Monthly Downloads: 23,119
Programming language: Elixir
License: MIT License
Tags: Authentication    
Latest version: v2.0.0

ueberauth_auth0 alternatives and similar packages

Based on the "Authentication" category.
Alternatively, view ueberauth_auth0 alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of ueberauth_auth0 or a related project?

Add another 'Authentication' Package

README

Überauth Auth0

Build Status Coverage Status Module Version Hex Docs Total Download License Last Updated

Auth0 OAuth2 strategy for Überauth.

Installation

  1. Set up your Auth0 application at Auth0 dashboard.

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

    def deps do
      [
        {:ueberauth_auth0, "~> 2.0"}
      ]
    end
    
  3. Ensure ueberauth_auth0 is started before your application:

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

    config :ueberauth, Ueberauth,
      providers: [
        auth0: {Ueberauth.Strategy.Auth0, []}
      ],
      # If you wish to customize the OAuth serializer,
      # add the line below. Defaults to Jason.
      json_library: Poison
    

    or with per-app config:

    config :my_app, Ueberauth,
      providers: [
        auth0: {Ueberauth.Strategy.Auth0, [otp_app: :my_app]}
      ]
    
  5. Update your provider configuration:

    config :ueberauth, Ueberauth.Strategy.Auth0.OAuth,
      domain: System.get_env("AUTH0_DOMAIN"),
      client_id: System.get_env("AUTH0_CLIENT_ID"),
      client_secret: System.get_env("AUTH0_CLIENT_SECRET")
    

    or with per-app config:

    config :my_app, Ueberauth.Strategy.Auth0.OAuth,
      domain: System.get_env("AUTH0_DOMAIN"),
      client_id: System.get_env("AUTH0_CLIENT_ID"),
      client_secret: System.get_env("AUTH0_CLIENT_SECRET")
    

    See the Ueberauth.Strategy.Auth0 module docs for more configuration options.

  6. Include the Überauth plug in your controller:

    defmodule MyApp.AuthController do
      use MyApp.Web, :controller
      plug Ueberauth
      ...
    end
    

    or with per-app config:

    defmodule MyApp.AuthController do
      use MyApp.Web, :controller
      plug Ueberauth, otp_app: :my_app
      ...
    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
    
  8. You controller needs to implement callbacks to deal with Ueberauth.Auth and Ueberauth.Failure responses.

For an example implementation see the Überauth Example application.

Copyright and License

Copyright (c) 2015 Son Tran-Nguyen \ Copyright (c) 2020 Klemen Sever

This library is released under the MIT License. See the [LICENSE.md](./LICENSE.md) file for further details.


*Note that all licence references and agreements mentioned in the ueberauth_auth0 README section above are relevant to that project's source code only.