Assent.Strategy.Twitter (Assent v0.4.0)

Copy Markdown View Source

Twitter OAuth 1.0a strategy.

The Twitter user endpoint only returns verified email, email_verified will always be true.

Usage

config = [
  consumer_key: "REPLACE_WITH_CONSUMER_KEY",
  consumer_secret: "REPLACE_WITH_CONSUMER_SECRET",
  redirect_uri: "http://localhost:4000/auth/callback"
]

See Assent.Strategy.OAuth for more.

Summary

Functions

Generates an OAuth 1.0a authorization URL.

Fetches user data using the access token returned by the provider.

Functions

authorize_url(config)

Generates an OAuth 1.0a authorization URL.

fetch_user(config, token)

@spec fetch_user(Keyword.t(), map()) :: {:ok, map()} | {:error, term()}

Fetches user data using the access token returned by the provider.