All Projects → ueberauth → Ueberauth_identity

ueberauth / Ueberauth_identity

Licence: mit
A username/password Strategy for Überauth

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to Ueberauth identity

Jomini
Historical battle simulation package for Python
Stars: ✭ 31 (-55.07%)
Mutual labels:  strategy
Mr.aspnet.identity.entityframework6
EntityFramework 6 provider + InMemory providers for Asp.Net Core Identity.
Stars: ✭ 41 (-40.58%)
Mutual labels:  identity
Ember Simple Auth Auth0
Auth0 + lock.js, built on ember-simple-auth
Stars: ✭ 53 (-23.19%)
Mutual labels:  identity
Zenbot
Zenbot is a command-line cryptocurrency trading bot using Node.js and MongoDB.
Stars: ✭ 8,085 (+11617.39%)
Mutual labels:  strategy
Active Directory B2c Dotnet Desktop
Sample showing how a Windows Desktop .NET (WPF) application can sign in a user using Azure AD B2C, get an access token using MSAL.NET and call an API.
Stars: ✭ 39 (-43.48%)
Mutual labels:  identity
Nase Strategie
Chceme mít náš stát konečně rádi a být na něj hrdí. Možná je to utopie... ale do 10 let začne upadat automobilový průmysl a naší zemi zbyde jen černý humor a "vyvezení talenti" za hranice. Je třeba nastartovat změnu, která udělá naše společenské a ekonomické prostředí nejatraktivnějším na světě.
Stars: ✭ 43 (-37.68%)
Mutual labels:  strategy
Thrive
The main repository for the development of the evolution game Thrive.
Stars: ✭ 874 (+1166.67%)
Mutual labels:  strategy
Aspnetcoreid4external
external OpenID Connect Login to IdentityServer4 with AAD
Stars: ✭ 63 (-8.7%)
Mutual labels:  identity
Rxdownloader
- Reactive Extension Library for Android to download files
Stars: ✭ 40 (-42.03%)
Mutual labels:  strategy
Eazebot
Free python/telegram bot for easy execution and surveillance of crypto trading plans on multiple exchanges.
Stars: ✭ 51 (-26.09%)
Mutual labels:  strategy
Epilink
Authenticate people on your Discord servers and give them roles automatically. All-in-one server back-end, Discord bot and front-end. Works with Google, Microsoft and any OpenID Connect provider.
Stars: ✭ 36 (-47.83%)
Mutual labels:  identity
Svg World Map
🗺 A JavaScript library to easily integrate one or more SVG world maps with all nations (countries) and second-level political subdivisions (countries, provinces, states).
Stars: ✭ 38 (-44.93%)
Mutual labels:  strategy
Knights province
Knights Province missions and wiki.
Stars: ✭ 43 (-37.68%)
Mutual labels:  strategy
Weidentity
基于区块链的符合W3C DID和Verifiable Credential规范的分布式身份解决方案
Stars: ✭ 972 (+1308.7%)
Mutual labels:  identity
Auth0 Socketio Jwt
Authenticate socket.io incoming connections with JWTs
Stars: ✭ 1,093 (+1484.06%)
Mutual labels:  identity
Cryptoinscriber
📈 A live cryptocurrency historical trade data blotter. Download live historical trade data from any cryptoexchange, be it for machine learning, backtesting/visualizing trading strategies or for Quantopian/Zipline.
Stars: ✭ 27 (-60.87%)
Mutual labels:  strategy
Identityserver4
OpenID Connect and OAuth 2.0 Framework for ASP.NET Core
Stars: ✭ 8,428 (+12114.49%)
Mutual labels:  identity
Aspnetcore.identity.documentdb
A Cosmos DB / DocumentDB Storage Provider for ASP.NET Core Identity
Stars: ✭ 64 (-7.25%)
Mutual labels:  identity
Blockstack Browser
The Blockstack Browser
Stars: ✭ 1,119 (+1521.74%)
Mutual labels:  identity
Ravendb.identity
RavenDB Identity provider for ASP.NET Core. Let RavenDB manage your users and logins.
Stars: ✭ 50 (-27.54%)
Mutual labels:  identity

Überauth Identity

Build Status Hex Version License

A simple username/password strategy for Überauth.

Installation

  1. Add :ueberauth_identity to your list of dependencies in mix.exs:

    def deps do
      [{:ueberauth_identity, "~> 0.2"}]
    end
    
  2. Add the strategy to your applications:

    def application do
      [applications: [:ueberauth_identity]]
    end
    
  3. Add Identity to your Überauth configuration:

    config :ueberauth, Ueberauth,
      providers: [
        identity: {Ueberauth.Strategy.Identity, [
          callback_methods: ["POST"]
        ]}
      ]
    
  4. Include the Überauth plug in your controller:

    defmodule MyApp.AuthController do
      use MyApp.Web, :controller
      plug Ueberauth
      ...
    end
    
  5. 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
      post "/identity/callback", AuthController, :identity_callback
    end
    
  6. Your request phase handler should implement a form or similar method to collect the required login information.

  7. The controller callback should validate login information using the Ueberauth.Auth struct:

    def identity_callback(%{assigns: %{ueberauth_auth: auth}} = conn, params) do
      case validate_password(auth.credentials) do
        :ok ->
          user = %{id: auth.uid, name: name_from_auth(auth), avatar: auth.info.image}
          conn
          |> put_flash(:info, "Successfully authenticated.")
          |> put_session(:current_user, user)
          |> redirect(to: "/")
        { :error, reason } ->
          conn
          |> put_flash(:error, reason)
          |> redirect(to: "/")
      end
    end
    

For an example implementation see the Überauth Example application.

Nested form attributes

Sometimes it's convenient to nest the returned params under a namespace. For example if you're using a "user" form, your params may come back as:

  %{ "user" => { "email" => "[email protected]"  }

If you're using a nested set of attributes like this you'll need to let Überauth Identity know about it. To do this set an option in your config:

    config :ueberauth, Ueberauth,
      providers: [
        identity: {Ueberauth.Strategy.Identity, [param_nesting: "user"]}
      ]

Params scrubbing

By default Überauth Identity will be changing empty values from the returned params to nil. If you want to disable that behaviour set the following option in your config:

    config :ueberauth, Ueberauth,
      providers: [
        identity: {Ueberauth.Strategy.Identity, [scrub_params: false]}
      ]

Calling

Depending on the configured url you can initial the request through:

/auth/identity/callback

License

Please see LICENSE for licensing details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].