OAuth2
OAuth 2.0 is an authorization protocol and NOT an authentication protocol. As such, it is designed primarily as a means of granting access to a set of resources, for example, remote APIs or user data. OAuth 2.0 uses Access Tokens.
Troubleshoot
If you are having issues with
redirect uriplease check the listed items
- Are you accessing the service trough a local ip
Example192.168.1.25or127.24.4.1 - Have you checked the provider
Redirect URIs/Origins (RegEx)
Head to Applications > Providers > YOR_PROVIDER > Edit to check
Immich
Using Authentik
Provider
- Go to Applications > Providers
- Create a new Provider
- Choose OAuth2/OpenID Provider
- Name: Immich
- Authentication flow: default-authentication-flow
- Authorization flow: default-provider-authorization-explicit-consent
- Redirect URIs/Origins (RegEx):
https://photos.yourdomain.com
https://photos.yourdomain.com.*
http://localhost:2283
- Make sure you copy the
Client IDandClient Secretinto notepad - Create the provider
for mobile
- Edit the Provider
- Scroll down to Redirect URIs/Origins (RegEx)
- Add URIs
app.immich:///oauth-callback
app.immich:///oauth-callback.*
- Save the provider and test mobile
Application
- Go to Applications > Applications
- Create a new application
- Use these options
- name:
Immich - slug:
photos( Recommended ) - provider:
Immich
- Hit create
Final Steps
- Head back to the provider
- Copy the
OpenID Configuration Issuerinto notepad
Setup in immich
- Go to Administration > Settings > Auth settings > OAuth
- Paste/Put in the values
- ISSUER URL - paste the
OpenID Configuration Issuerhere - CLIENT ID - paste the
Client Idhere - CLIENT SECRET - paste the
Client Secrethere
- Check if these options are correct
| Service | scope | Signing algorithim | Button text |
|---|---|---|---|
| Authentik | openid email profile |
RS256 |
Authentik |
- Save the config
Gitea
Using Authentik
Provider
- Go to Applications > Providers
- Create a new provider
- Choose OAuth2/OpenID Provider
- Name: Gitea
- Authentication flow: default-authentication-flow
- Authorization flow: default-provider-authorization-explicit-consent
- Copy the
Client IdandClient Secretinto notepad - Create the provider
Application
- Go to Applications > Applications
- Create a new Application
- Use these options
name:Gitea
slug:git( Recommended )
provider:Gitea - Hit create
Final Steps
- Head back to the provider
- Copy the
OpenID Configuration URLinto notepad
Using Github
- Head to Settings > Developer Options > OAuth Apps
- Clock on New OAuth App
- Put in these values
- Application Name:
Gitea - Homepage Url:
YOUR_GITEA_URL_INSTANCE - Application Description:
Login to (URL_HERE) using github - Authorization callback url>
URL_HERE/user/oauth2/Github/callback
- Register the Application
- Generate a new Client Secret
- Copy the Client Id and CLient Secret
Setup in Gitea
- Go to Sitea Administration > Identity & Access > Authentication Sources
- Click on Add Authentication Source
For Authentik
Paste/Put in the values
- Authentication Name:
Authentik - Authentication Type:
OAuth2 - OAuth2 Provider:
OpenID Connect - Client Id >
PASTE_THE_CLIENT_ID_YOU_SAVED - Client Secret >
PASTE_THE_CLIENT_SECRET_YOU_SAVED - OpenID Connect Auto Discovery URL >
PASTE_THE_OPENID_CONFIGURATION_URL_YOU_SAVED - Additional Scopes:
email profile - ( Optional ) Icon url:
https://authentik.yourdomain.com/static/dist/assets/icons/icon.svg
Create the Source once finished
For Github
Paste/Put in the values
- Authentication Name:
Github - Authentication Type:
OAuth2 - OAuth2 Provider:
Github - Client Id >
PASTE_THE_CLIENT_ID_YOU_SAVED - Client Secret >
PASTE_THE_CLIENT_SECRET_YOU_SAVED - ( Optional ) Icon URL:
https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
Create the Source once finished