Steamex.Auth
Functions related to authenticating with the Steam OpenID provider.
Summary
auth_url(realm, return_to) | Returns the URL you should direct your users to in order to log in |
validate_payload(payload, httpoison \\ HTTPoison) | Validate a “return_to” payload from Steam |
Functions
Specs:
Returns the URL you should direct your users to in order to log in.
realm
should be set to your base URL, i.e. “http://example.com“.
return_to
is the URL that Steam will redirect to after a successful auth.
If you use Steamex.Auth.Phoenix
, this is realm <> "/steamex/return_to"
by default.
Specs:
- validate_payload(%{}, atom) :: integer
Validate a “return_to” payload from Steam.
You probably want to use Steamex.Auth.Plug
/Steamex.Auth.Phoenix
to handle this for you, but it’s here in case you want to validate payloads
manually.
This function will raise an exception if validation fails, or return the user’s Steam ID as an integer if it succeeds.