First you will have to register your application on Twitter. Check out the documentation for more information: https://developer.twitter.com/en/docs/basics/authentication/overview/oauth.
You must set up a callback url and check "Allow this application to be used to Sign in with Twitter".
Next configure a resource owner of type twitter
with appropriate
client_id
, client_secret
.
# config/packages/hwi_oauth.yaml
hwi_oauth:
resource_owners:
any_name:
type: twitter
client_id: <consumer-key>
client_secret: <consumer-secret>
When you want to request a user’s email address permission use
the optional option [include_email
].
Twitter documentation:
# config/packages/hwi_oauth.yaml
hwi_oauth:
resource_owners:
any_name:
type: twitter
client_id: <consumer-key>
client_secret: <consumer-secret>
options:
include_email: true
When you're done. Continue by configuring the security layer or go back to setup more resource owners.