Skip to content
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

Adds Immich API authentication method #176

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

RyanShahidi
Copy link

@RyanShahidi RyanShahidi commented Oct 7, 2024

Adds API authentication as discussed in #163 and attempted to follow and expand on similar methods as implemented in #164

This implementation supports both shared links and an API access code, to allow the user to easily select their prefered method of adding Immich to the app. There are still errors displaying videos when the API access is used and should be fixed before merging into main, I am just opening this incase others wanted to help.

Screenshots for Shared Link
image
image

Screenshots for API
image
image

Select Album options on API link
image

}

private fun getApiInterface() {
val trustAllCerts = arrayOf<TrustManager>(object : X509TrustManager {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is those code needed to ignore invalid or local SSL certs?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if there is a better method I think it should be utilized instead. Without this code I was getting the following error:

javax.net.ssl.SSLHandshakeException: Chain validation failed Caused by: java.security.cert.CertificateException: Chain validation failed

@RyanShahidi RyanShahidi marked this pull request as ready for review November 12, 2024 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants