-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat: start oauth with autoLaunch=1
#18763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jrasm91
merged 12 commits into
immich-app:main
from
Yetangitu:oauth_autolaunch_parameter
May 30, 2025
Merged
feat: start oauth with autoLaunch=1
#18763
jrasm91
merged 12 commits into
immich-app:main
from
Yetangitu:oauth_autolaunch_parameter
May 30, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
By launching Immich with `/auth/login?autoLaunch=1` an OpenID Connect login attempt is directly initated on installations where OAuth Auto Launch is not enabled. The intended use for this parameter is to enable Immich to be launched from e.g. Nextcloud using the _External sites_ app and the _oids_ OpenID Connect provider app so as to enable the user to directly interact with Immich without the need to press the `Login with ...` button.
jrasm91
approved these changes
May 30, 2025
Member
jrasm91
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/auth/login?autoLaunch=1autoLaunch=1
jrasm91
reviewed
May 30, 2025
_This could be a single line_ And now it is, as is its predecessor.
…ich into oauth_autolaunch_parameter Merge upstream
danieldietzler
previously approved these changes
May 30, 2025
Didn't mean to approve it yet, sorry.
danieldietzler
approved these changes
May 30, 2025
savely-krasovsky
pushed a commit
to savely-krasovsky/immich
that referenced
this pull request
Jun 8, 2025
* Add automatic OpenID Connect login by using parameter `autoLaunch=1` By launching Immich with `/auth/login?autoLaunch=1` an OpenID Connect login attempt is directly initated on installations where OAuth Auto Launch is not enabled. The intended use for this parameter is to enable Immich to be launched from e.g. Nextcloud using the _External sites_ app and the _oids_ OpenID Connect provider app so as to enable the user to directly interact with Immich without the need to press the `Login with ...` button. * Add documentation for autolaunch by navigating to `/auth/login?autoLaunch=1` * Look ma, no braces! _This could be a single line_ And now it is, as is its predecessor. * Change formatting to satisfy _prettier_ * if (condition) return true -> return condition * More _prettier_ reformatting * Look ma, braces!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By launching Immich with
/auth/login?autoLaunch=1an OpenID Connect login attempt is directly initated on installations where OAuth Auto Launch is not enabled. The intended use for this parameter is to enable Immich to be launched from e.g. Nextcloud using the External sites app and the oids OpenID Connect provider app so as to enable the user to directly interact with Immich without the need to press theLogin with ...button.Description
This PR implements the feature suggested in #18751:
It wwould be useful for Immich to have a way to directly access the OAuth login workflow through a URL or parameter (e.g.
autoLaunch=1, i.e. the opposite of the action mentioned in https://immich.app/docs/administration/oauth#auto-launch).Here's the use case I'm looking at:
For an example of such a workflow have a look at what e.g. Peertube does when accessed through
https://peertube.example.org/plugins/auth-openid-connect/0.1.3/auth/openid-connect- it does not show the login page but directly activates the OAuth login workflow, landing the user inside a logged-in instance.This feature request aims to achieve the opposite of what
featureFlags.oauthAutoLaunchenables in that it explicitly calls forautoLaunchon an instance which does not have this feature enabled instead of always using it with the option to disable it through the use of theautoLaunch=0parameter. Adding an option to useautoLaunch=1for the requested feature is probably the most clean way to do it, in./src/routes/auth/login/+page.svelte(add a check foroauth.isAutoLaunchEnabled) and./src/lib/utils.ts(add a test forisAutoLaunchEnabled)How Has This Been Tested?
Tested using in-place edited JS files in the FF inspector for lack of a complete Immich build infrastructure.
API Changes
/auth/login?autoLaunch=1- initiates OpenID Connect login process without the need for user interaction on systems which do not have OAuth Auto Launch enabled.Checklist: