sources/oauth: migrate twitter to oauth2 (#2893)

This commit is contained in:
Jens L
2022-05-18 00:03:02 +02:00
committed by GitHub
parent 538c2ca4d3
commit 75b0fb3393
16 changed files with 773 additions and 924 deletions

View File

@ -5,6 +5,10 @@ slug: "2022.5"
## Breaking changes
- Twitter Source has been migrated to OAuth2
This requires some reconfiguration on both Twitter's and authentik's side. Check out the new Twitter integration docs [here](../../integrations/sources/twitter/)
## New features
- LDAP Outpost cached binding

View File

@ -50,7 +50,7 @@ The following placeholders will be used:
## authentik
20. Under _Resources -> Sources_ Click **Create Apple OAuth Source**
20. Under _Directory -> Federation & Social login_ Click **Create Apple OAuth Source**
21. **Name**: `Apple`
22. **Slug**: `apple`

View File

@ -30,21 +30,20 @@ The following placeholders will be used:
Here is an example of a completed OAuth2 screen for Discord.
![Example Screen](discord4.png)
![](discord4.png)
## authentik
8. Under _Resources -> Sources_ Click **Create Discord OAuth Source**
8. Under _Directory -> Federation & Social login_ Click **Create Discord OAuth Source**
9. **Name:** Choose a name (For the example I used Discord)
10. **Slug:** discord (You can choose a different slug, if you do you will need to update the Discord redirect URLand point it to the correct slug.)
11. **Consumer Key:** Client ID from step 4
12. **Consumer Secret:** Client Secret from step 5
13. **Provider type:** Discord
Here is an example of a complete authentik Discord OAuth Source
![Example Screen](discord5.png)
![](discord5.png)
Save, and you now have Discord as a source.

View File

@ -24,24 +24,23 @@ The following placeholders will be used:
Example screenshot
![Example Screen](githubdeveloperexample.png)
![](githubdeveloperexample.png)
6. Copy the **Client ID** and _save it for later_
7. Click **Generate a new client secret** and _save it for later_ You will not be able to see the secret again, so be sure to copy it now.
## authentik
8. Under _Resources -> Sources_ Click **Create Github OAuth Source**
8. Under _Directory -> Federation & Social login_ Click **Create Github OAuth Source**
9. **Name**: Choose a name (For the example I use Github)
10. **Slug**: github (If you choose a different slug the URLs will need to be updated to reflect the change)
11. **Consumer Key:** Client ID from step 6
12. **Consumer Secret:** Client Secret from step 7
13. **Provider Type:** Github
Here is an example of a complete authentik Github OAuth Source
![Example Screen](githubexample2.png)
![](githubexample2.png)
Save, and you now have Github as a source.

View File

@ -17,23 +17,23 @@ You will need to create a new project, and OAuth credentials in the Google Devel
1. Visit https://console.developers.google.com/ to create a new project
2. Create a New project.
![Example Screen](googledeveloper1.png)
![](googledeveloper1.png)
3. **Project Name**: Choose a name
4. **Organization**: Leave as default if unsure
5. **Location**: Leave as default if unsure
![Example Screen](googledeveloper2.png)
![](googledeveloper2.png)
6. Click **Create**
7. Choose your project from the drop down at the top
8. Click the **Credentials** menu item on the left. It looks like a key.
![Example Screen](googledeveloper3.png)
![](googledeveloper3.png)
9. Click on **Configure Consent Screen**
![Example Screen](googledeveloper4.png)
![](googledeveloper4.png)
10. **User Type:** If you do not have a Google Workspace (GSuite) account choose _External_. If you do have a Google Workspace (Gsuite) account and want to limit access to only users inside of your organization choose _Internal_
@ -50,30 +50,29 @@ _I'm only going to list the mandatory/important fields to complete._
19. Click **Create Credentials** on the top of the screen
20. Choose **OAuth Client ID**
![Example Screen](googledeveloper5.png)
![](googledeveloper5.png)
21. **Application Type:** Web Application
22. **Name:** Choose a name
23. **Authorized redirect URIs:** `https://authenik.company/source/oauth/callback/google/`
![Example Screen](googledeveloper6.png)
![](googledeveloper6.png)
24. Click **Create**
25. Copy and store _Your Client ID_ and _Your Client Secret_ for later
## authentik
26. Under _Resources -> Sources_ Click **Create Google OAuth Source**
26. Under _Directory -> Federation & Social login_ Click **Create Google OAuth Source**
27. **Name**: Choose a name (For the example I use Google)
28. **Slug**: google (If you choose a different slug the URLs will need to be updated to reflect the change)
29. **Consumer Key:** Your Client ID from step 25
30. **Consumer Secret:** Your Client Secret from step 25
31. **Provider Type:** Google
Here is an example of a complete authentik Google OAuth Source
![Example Screen](authentiksource.png)
![](authentiksource.png)
Save, and you now have Google as a source.

View File

@ -43,7 +43,7 @@ The following placeholders will be used:
Here is an example of a complete authentik Mailcow OAuth Source
![Example Screen](mailcow5.png)
![](mailcow5.png)
Save, and you now have Mailcow as a source.

View File

@ -0,0 +1,46 @@
---
title: Twitter
---
Allows users to authenticate using their twitter credentials
## Preparation
The following placeholders will be used:
- `authentik.company` is the FQDN of the authentik install.
## Twitter
You will need to create a new project, and OAuth credentials in the Twitter Developer console.
1. Visit https://developer.twitter.com/ to create a new App
2. Select an environment fitting to your use-case
3. Give the app a name, for example _authentik_
4. Finish setting up the app by clicking **App settings**. Any of the API keys on this screen are not used by authentik.
5. Click the **Set up** button
![](./twitter1.png)
6. Enable **OAuth 2.0**
7. Set **Type of App** to _Web_
8. Set **Callback URI / Redirect URL** to `https://authenik.company/source/oauth/callback/twitter/`
9. Set **Website URL** to `https://authentik.company`
![](./twitter2.png)
10. Confirm with **Save**
11. Copy and store **Client ID** and **Client Secret** for later
## authentik
1. Under _Directory -> Federation & Social login_ Click **Create Twitter OAuth Source**
2. **Name**: Choose a name (For the example I use Google)
3. **Slug**: twitter (If you choose a different slug the URLs will need to be updated to reflect the change)
4. **Consumer Key:** Your Client ID from step 25
5. **Consumer Secret:** Your Client Secret from step 25
:::note
For more details on how-to have the new source display on the Login Page see [here](../).
:::

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

View File

@ -37,8 +37,8 @@ module.exports = {
"services/rocketchat/index",
"services/roundcube/index",
"services/sentry/index",
"services/sssd/index",
"services/sonarr/index",
"services/sssd/index",
"services/tautulli/index",
"services/ubuntu-landscape/index",
"services/uptime-kuma/index",
@ -70,6 +70,7 @@ module.exports = {
"sources/oauth/index",
"sources/plex/index",
"sources/saml/index",
"sources/twitter/index",
],
},
],