Skip to content

Garmin Connect OAuth 1.0a strategy for Überauth

License

Notifications You must be signed in to change notification settings

Tiltify/ueberauth_garmin_connect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Überauth Garmin Connect

Garmin Connect strategy for Überauth.

Installation

  1. Setup your application at Garmin Developers.

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

    def deps do
      [
        {:ueberauth_garmin_connect, git: "git://github.com/tiltify/ueberauth_garmin_connect.git"}
      ]
    end
  3. Add Garmin to your Überauth configuration:

    config :ueberauth, Ueberauth,
      providers: [
        garmin_connect: {Ueberauth.Strategy.GarminConnect, []}
      ]
  4. Update your provider configuration:

    config :ueberauth, Ueberauth.Strategy.GarminConnect.OAuth,
      consumer_key: System.get_env("GARMIN_CONNECT_CONSUMER_KEY"),
      consumer_secret: System.get_env("GARMIN_CONNECT_CONSUMER_SECRET")
  5. Include the Überauth plug in your controller:

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

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

/auth/garmin_connect

License

This library is released under the MIT License. See the LICENSE file for further details.

About

Garmin Connect OAuth 1.0a strategy for Überauth

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages