Skip to content

Commit

Permalink
add twitter oauth2
Browse files Browse the repository at this point in the history
  • Loading branch information
w-ensink committed Dec 2, 2024
1 parent 3f533fd commit 22873ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Currently supports SURFconext, eduGAIN, LinkedIn and Twitter.
| `IRMA_SERVER_API_TOKEN` | API token for the IRMA server |
| `LINKEDIN_CLIENT_ID` | LinkedIn Client ID |
| `LINKEDIN_CLIENT_SECRET` | LinkedIn Client Secret |
| `TWITTER_CLIENT_ID` | Twitter Client ID |
| `TWITTER_CLIENT_SECRET` | Twitter Client Secret |

## Build
* `composer install`
Expand Down
10 changes: 10 additions & 0 deletions template/authsources.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,14 @@
'clientSecret' => getenv('LINKEDIN_CLIENT_SECRET'),
'scopes' => array('openid', 'email', 'profile'),
),

'twitter' => [
'authoauth2:OAuth2',
'urlAuthorize' => 'https://www.api.x.com/oauth2/authorize',
'urlAccessToken' => 'https://www.api.x.com/oauth2/token',
'urlResourceOwnerDetails' => 'https://api.api.x.com/userinfo',
'clientId' => getenv('TWITTER_CLIENT_ID'),
'clientSecret' => getenv('TWITTER_CLIENT_SECRET'),
'scopes' => ['email', 'profile'],
]
);

0 comments on commit 22873ed

Please sign in to comment.