Giter Site home page Giter Site logo

ueberauth_hatena's Introduction

ÜberauthHatena

Hatena strategy for Überauth.

Installation

Add :ueberauth_hatena to list of your dependencies in mix.exs.

def deps do
  [{:ueberauth_hatena, "~> 0.1"},
   {:oauth, github: "tim/erlang-oauth"}]
end

Usage

  1. Create your OAuth application at Hatena Developer Center.
  2. Add Hatena to your Ueberauth configuration.
    config :ueberauth, Ueberauth,
      providers: [
        hatena: {Ueberauth.Strategy.Hatena, []}
      ]
  3. Add consumer key and secret from your OAuth application. And set scope the application.
    config :ueberauth, Ueberauth.Strategy.Hatena.OAuth,
      consumer_key: System.get_env("HATENA_CONSUMER_KEY"),
      consumer_secret: System.get_env("HATENA_CONSUMER_SECRET"),
      scope: "read_public,write_public"
  4. Include the Ueberauth plug in your controller. And please implement request method and callback method.
    defmodule MyApp.AuthController do
      use MyApp.Web, :controller
      plug Ueberauth
    
      def request(conn, _params) do
        ...
      end
    
      def callback(conn, _params) do
        ...
      end
    end
  5. Create reqeust and callback endpoint your router.
    scope "/auth", MyApp do
      pipe_through :browser
    
      get "/:provider", AuthController, :request
      get "/:provider/callback", AuthController, :callback
    end

For an example implementation see the Überauth Example application.

License

The software is available as open source under the terms of the MIT License.

ueberauth_hatena's People

Contributors

dependabot-preview[bot] avatar h3poteto avatar renovate[bot] avatar

Watchers

 avatar  avatar

ueberauth_hatena's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build.yml
  • actions/checkout v3
  • erlef/setup-beam v1
  • actions/cache v3
.github/workflows/release.yml
  • actions/checkout v3
  • erlef/setup-beam v1
  • actions/cache v3
mix
mix.exs
  • httpoison ~> 2.0
  • oauther ~> 1.1
  • ueberauth ~> 0.10
  • credo ~> 1.7.0
  • ex_doc ~> 0.30

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.