API¶
socialauth
¶
Handle HTTP GET requests on an authentication endpoint.
Authentication flow begins when
params
has alogin
key with a value ofstart
. For instance,/auth/twitter?login=start
.Parameters: - provider (str) – An provider to obtain a user ID from.
- request_url (str) – The authentication endpoint/callback.
- params (dict) – GET parameters from the query string.
- token_secret (str) – An app secret to encode/decode JSON web tokens.
- token_cookie (str) – The current JSON web token, if available.
Returns: A dict containing any of the following possible keys:
status
: an HTTP status code the server should sentredirect
: where the client should be directed to continue the flowset_token_cookie
: contains a JSON web token and should be stored by the client and passed in the next call.provider_user_id
: the user ID from the login providerprovider_user_name
: the user name from the login provider