メインコンテンツにスキップ

Immich

Immich はセルフホスト型の写真およびビデオライブラリです。Web アプリおよび iOS および Android アプリで、任意の OpenID Connect (OIDC) プロバイダーとの OAuth サインインをサポートしています。Casdoor をプロバイダーとして使用することで、ユーザーは Casdoor アカウントで Immich にサインインできます。

Create the application in Casdoor​

  1. Casdoor 管理コンソールで、ユーザーの組織を開き、アプリケーションを追加するか、既存のアプリケーションを開きます。

  2. Immich のコールバックを Redirect URLs に追加します:

    https://photos.example.com/auth/login
    https://photos.example.com/user-settings
    app.immich:///oauth-callback

    最初の2つは、Immich を開くすべてのアドレス用に追加します。最後の1つはモバイルアプリ用です。

  3. 保存し、Client ID と Client secret をメモしてください。

Configure OAuth in Immich​

  1. Immich で、Administration > Settings > OAuth に移動し、OAuth を有効にします。

  2. 設定を入力します:

    SettingValue
    Issuer URLhttps://door.example.com
    Client ID<your-client-id>
    Client Secret<your-client-secret>
    Scopeopenid email profile
    Storage Label Claimpreferred_username
    Button TextLogin with Casdoor
    Auto RegisterOn
    • Issuer URL: Casdoor の URL です。Immich は Casdoor のディスカバリードキュメントを通じて残りの情報を取得します。
    • Storage Label Claim: ユーザーのアップロードフォルダの名前を、そのユーザーの Casdoor ユーザー名に基づいて設定します。
  3. Save をクリックします。

結果の確認​

  1. プライベートブラウザウィンドウで Immich を開きます。サインインページに Login with Casdoor が表示されます。
  2. それをクリックして Casdoor にサインインします。Casdoor ユーザーがサインインした状態で Immich が開きます。
  3. Immich モバイルアプリでサーバー URL を入力すると、同じボタンが表示されます。

すでに Immich アカウントを持っているユーザーは、Account Settings > OAuth で Casdoor とリンクできます。

トラブルシューティング​

SymptomCause and fix
Casdoor に Redirect URI: ... doesn't exist in the allowed Redirect URI list と表示されるエラーに表示された URL を Redirect URLs に追加します。Immich はアクセスされるすべてのアドレスに対してリダイレクト URL が必要です。
Sign-in works in the browser but not in the mobile appAdd app.immich:///oauth-callback to Redirect URLs.
A new user is not createdCheck that Auto Register is on and that the Casdoor user has an email address.

関連項目​