Ueberauth Weibo v0.0.1 Ueberauth.Strategy.Weibo.OAuth
An implementation of OAuth2 for weibo.
To add your client_id
and client_secret
include these values in your configuration.
config :ueberauth, Ueberauth.Strategy.Weibo.OAuth,
client_id: System.get_env("GITHUB_CLIENT_ID"),
client_secret: System.get_env("GITHUB_CLIENT_SECRET")
Summary
Functions
Provides the authorize url for the request phase of Ueberauth. No need to call this usually
Construct a client for requests to Weibo
Calls OAuth2 Client to get access token. Since weibo returns body as string: :body=>”{“access_token”:”2.xxx”,”expires_in”:86400,”uid”:”12345”}”, request does not parse correctly. As a result, a temp fix is to build a new access token using decoded dict
Functions
Provides the authorize url for the request phase of Ueberauth. No need to call this usually.
Construct a client for requests to Weibo.
Optionally include any OAuth2 options here to be merged with the defaults.
Ueberauth.Strategy.Weibo.OAuth.client(redirect_uri: "http://localhost:4000/auth/weibo/callback")
This will be setup automatically for you in Ueberauth.Strategy.Weibo
.
These options are only useful for usage outside the normal callback phase of Ueberauth.