oauth2cli alternatives and similar packages
Based on the "Authentication" category.
Alternatively, view oauth2cli alternatives based on common mentions on social networks and blogs.
-
coherence
Coherence is a full featured, configurable authentication system for Phoenix -
ueberauth
An Elixir Authentication System for Plug-based Web Applications -
phx_gen_auth
An authentication system generator for Phoenix 1.5 applications. -
guardian_db
Guardian DB integration for tracking tokens and ensuring logout cannot be replayed. -
Phauxth
Not actively maintained - Authentication library for Phoenix, and other Plug-based, web applications -
Shield
Shield is an OAuth2 Provider hex package and also a standalone microservice build top of the Phoenix Framework and 'authable' package. -
elixir_auth_google
👤Minimalist Google OAuth Authentication for Elixir Apps. Tested, Documented & Maintained. Setup in 5 mins. 🚀 -
samly
Elixir Plug library to enable SAML 2.0 SP SSO in Phoenix/Plug applications. -
basic_auth
Elixir Plug to easily add HTTP basic authentication to an app -
doorman
Tools to make Plug, and Phoenix authentication simple and flexible. -
ueberauth_identity
A username/password Strategy for Überauth -
Paseto
An Elixir implementation of Paseto (Platform-Agnostic Security Tokens) -
passwordless_auth
A library for simple passwordless authentication -
aeacus
A simple, secure, and highly configurable Elixir identity [username | email | id | etc.]/password authentication module to use with Ecto. -
sigaws
An Elixir library to sign and verify HTTP requests using AWS Signature V4 -
phoenix_client_ssl
Set of Plugs / Lib to help with SSL Client Auth. -
ueberauth_cas
Central Authentication Service strategy for Überauth -
exBankID
exBankID is a simple stateless API-client for the Swedish BankID API -
ueberauth_active_directory
Uberauth strategy for Active Directory authentication. -
zachaeus
An easy to use licensing system, using asymmetric cryptography to generate and validate licenses. -
ex_aws_msk_iam_auth
AWS_MSK_IAM Authentication Plugin for Broadway Kafka
InfluxDB - Power Real-Time Data Analytics at Scale
Do you think we are missing an alternative of oauth2cli or a related project?
README
OAuth2Cli
Much (very much) of this code is derived from Sonny Scroggin's great OAuth2 package, but it wasn't quite fitting my needs, so I ended up making my own. There are a few key differences between them.
OAuth2Cli:
- Holds OAuth strategies in memory for later use
- Doesn't normalize oauth responses, it simply returns them
- Adds some features (using a discovery url, for example)
- Is currently only able to use access codes for oauth, not user/pass
If you're looking for a simple oauth library that makes it really easy to send an access code (to Google in particular) and get a token back, this is the library you want.
Usage
So far, I only have one situation coded out: utilizing an access code with Google's OAuth2 API
Registration
Start by registering an oauth strategy:
Simple example:
- This is the same as the multiple strategies example below, it simply sets its name to :default*
elixir params = %{ client_id: "someid12345", client_secret: "somesecret12345", redirect_uri: "http://whatever.com/oauth", token_endpoint: "https://www.googleapis.com/oauth2/v3/token" } OAuth2Cli.register(params) # > :ok
Multiple strategies:
params1 = %{
client_id: "someid12345",
client_secret: "somesecret12345",
redirect_uri: "http://whatever.com/oauth",
token_endpoint: "https://www.googleapis.com/oauth2/v3/token"
}
params2 = %{
client_id: "someid12345",
client_secret: "somesecret12345",
redirect_uri: "http://whatever.com/oauth",
token_endpoint: "https://someotherservice.com/oauth"
}
OAuth2Cli.register(:google, params1)
# > :ok
OAuth2Cli.register(:other, params2)
# > :ok
Utilizing a discovery service:
params = %{
client_id: "someid12345",
client_secret: "somesecret12345",
redirect_uri: "http://whatever.com/oauth"
}
discovery_uri = "https://accounts.google.com/.well-known/openid-configuration"
OAuth2Cli.register(:google, params, discovery_uri)
# > :ok
Authorizing Users
OAuth2Cli.authorize_user("access_code_asdfasdfasdfasdfasdf")
# > {:ok,
# > %OAuth2Cli.Response{
# > body: %{access_token: "asdfasdfasdfasdfsadfasdfasdf",
# > expires_in: 3600,
# > id_token: "asdfsadfsadfsadfsadfsadfsadfsadfsadfsadfasdfasdfa",
# > token_type: "Bearer"},
# > headers: [{"Cache-Control", "no-cache, no-store, max-age=0, must-revalidate"},
# > {"Pragma", "no-cache"}, {"Expires", "Fri, 01 Jan 1990 00:00:00 GMT"},
# > {"Date", "Mon, 05 Jan 2015 22:49:06 GMT"}, {"Vary", "Origin"},
# > {"Vary", "X-Origin"}, {"Content-Type", "application/json; charset=UTF-8"},
# > {"X-Content-Type-Options", "nosniff"}, {"X-Frame-Options", "SAMEORIGIN"},
# > {"X-XSS-Protection", "1; mode=block"}, {"Server", "GSE"},
# > {"Alternate-Protocol", "443:quic,p=0.02"}, {"Transfer-Encoding", "chunked"}],
# > status_code: 200
# > }
# > }
or
OAuth2Cli.authorize_user(:strategy_name, "codecodecode")