UeberauthFusion
Fusion OAuth2 strategy for Überauth
Installation
Setup fusion auth. More detail can be found in the Fusion Auth documentation page:
Add
:ueberauth_fusion
to you list of dependencies inmix.exs
def deps do [ {:ueberauth_fusion, "~> 0.9.0"} ] end
Add fusion to your Überauth configuration:
config :ueberauth, Ueberauth, providers: [ fusion: {Ueberauth.Strategy.Fusion, []}, ]
Configure provider Strategy You have to configure client_id, client_secret, and fusion_url. The rest of the fields are build using the fusion_url field.
config :ueberauth, Ueberauth.Strategy.Fusion.OAuth, # Mandatory Fields client_id: System.get_env("FUSION_APP_ID"), client_secret: System.get_env("FUSION_APP_SECRET"), fusion_url: System.get_env("FUSION_URL"), # Optional Fields - If not provided they build using fusion_url redirect_url: System.get_env("FUSION_REDIRECT_URL"), sign_out_url: System.get_env("FUSION_SIGNOUT_URL"), authorize_url: System.get_env("FUSION_AUTH_URL") token_url: System.get_env("FUSION_AUTH_TOKEN"), userinfo_url: System.get_env("FUSION_USERINFO_URL"), jwk_set_url: System.get_env("FUSION_JWK_URL"), token_method: System.get_env("FUSION_TOKEN_METHOD")
When the user log out from the system, you have to redirect the user to fusion auth logout url. Otherwise, the session in fusion authentication system will remain active.
Ueberauth.Strategy.Fusion.logout(conn)
For an example implementation see the Überauth Example application.
License
Please see LICENSE for licensing details.