[BUG] User state is not deleted after logout #1788

Closed
opened 2026-02-05 03:46:26 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @MohamedFBoussaid on GitHub (Dec 15, 2023).

User state is not deleted after logout

immich iOS version : 1.90.0 build.130

I have created two accounts in my server. The first one is handling the backup from my phone, and the second one is just for my old phones.
I have created the second one bcs I don't want to mix my current photos and the old photos in the timeline.
The first account (the one used for the backup) : I have configure it to backup photos from the a given Album, and I make it work in background
But, when I have connected with the second account (I have added my old photos to this account using immich CLI): It got the configuration of my first account and it started to backup my phone photo using the first account config

The OS that Immich Server is running on

Debian GNU/Linux 12 (bookworm)

Version of Immich Server

v1.90.2

Version of Immich Mobile App

1.90.0 build.130

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    command: ["start.sh", "immich"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: ["start.sh", "microservices"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    environment:
      TYPESENSE_API_KEY: ${TYPESENSE_API_KEY}
      TYPESENSE_DATA_DIR: /data
      # remove this to get debug messages
      GLOG_minloglevel: 1
    volumes:
      - tsdata:/data
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:6a0e35296341e676fe6bd8d236c72afffe2dfe3d7eb9c2405c0f3fc04500cd07
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

  backup:
    container_name: immich_db_backup
    image: prodrigestivill/postgres-backup-local
    labels:
      - "com.centurylinklabs.watchtower.enable=false"
    env_file:
      - .env
    environment:
      POSTGRES_HOST: database
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      SCHEDULE: "@daily"
      BACKUP_KEEP_DAYS: 5
      BACKUP_DIR: /db_backup
    volumes:
      - ${DB_BACKUP_LOCATION}:/db_backup
    depends_on:
      - database

volumes:
  pgdata:
  model-cache:
  tsdata:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=/media/PI-2048-ST/immich/library
# The location where your daily db backup is stored
DB_BACKUP_LOCATION=/media/PI-2048-ST/immich/db_backup

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DB_PASSWORD=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1.Created two accounts in the server
2.Connect to the first account using the mobile app
3.Set the backup preferences (Album to backup, how to backup ...) using the mobile app
4.Logout from the first account using the mobile app
5.Connect with the second account using the mobile app

Result: 
The second account get the first account settings

Expected: 
Each account should have it own settings

Additional information

No response

Originally created by @MohamedFBoussaid on GitHub (Dec 15, 2023). ### User state is not deleted after logout immich iOS version : 1.90.0 build.130 I have created two accounts in my server. The first one is handling the backup from my phone, and the second one is just for my old phones. I have created the second one bcs I don't want to mix my current photos and the old photos in the timeline. The first account (the one used for the backup) : I have configure it to backup photos from the a given Album, and I make it work in background But, when I have connected with the second account (I have added my old photos to this account using immich CLI): It got the configuration of my first account and it started to backup my phone photo using the first account config ### The OS that Immich Server is running on Debian GNU/Linux 12 (bookworm) ### Version of Immich Server v1.90.2 ### Version of Immich Mobile App 1.90.0 build.130 ### Platform with the issue - [ ] Server - [ ] Web - [X] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} labels: - "com.centurylinklabs.watchtower.enable=false" command: ["start.sh", "immich"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - .env ports: - 2283:3001 depends_on: - redis - database - typesense restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} labels: - "com.centurylinklabs.watchtower.enable=false" # extends: # file: hwaccel.yml # service: hwaccel command: ["start.sh", "microservices"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - .env depends_on: - redis - database - typesense restart: always typesense: container_name: immich_typesense image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd labels: - "com.centurylinklabs.watchtower.enable=false" environment: TYPESENSE_API_KEY: ${TYPESENSE_API_KEY} TYPESENSE_DATA_DIR: /data # remove this to get debug messages GLOG_minloglevel: 1 volumes: - tsdata:/data restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} labels: - "com.centurylinklabs.watchtower.enable=false" volumes: - model-cache:/cache env_file: - .env restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 labels: - "com.centurylinklabs.watchtower.enable=false" restart: always database: container_name: immich_postgres image: postgres:14-alpine@sha256:6a0e35296341e676fe6bd8d236c72afffe2dfe3d7eb9c2405c0f3fc04500cd07 labels: - "com.centurylinklabs.watchtower.enable=false" env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always backup: container_name: immich_db_backup image: prodrigestivill/postgres-backup-local labels: - "com.centurylinklabs.watchtower.enable=false" env_file: - .env environment: POSTGRES_HOST: database POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_USER: ${DB_USERNAME} POSTGRES_PASSWORD: ${DB_PASSWORD} SCHEDULE: "@daily" BACKUP_KEEP_DAYS: 5 BACKUP_DIR: /db_backup volumes: - ${DB_BACKUP_LOCATION}:/db_backup depends_on: - database volumes: pgdata: model-cache: tsdata: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=/media/PI-2048-ST/immich/library # The location where your daily db backup is stored DB_BACKUP_LOCATION=/media/PI-2048-ST/immich/db_backup # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secrets for postgres and typesense. You should change these to random passwords TYPESENSE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx DB_PASSWORD=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # The values below this line do not need to be changed ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash 1.Created two accounts in the server 2.Connect to the first account using the mobile app 3.Set the backup preferences (Album to backup, how to backup ...) using the mobile app 4.Logout from the first account using the mobile app 5.Connect with the second account using the mobile app Result: The second account get the first account settings Expected: Each account should have it own settings ``` ### Additional information _No response_
OVERLORD added the 📱mobile label 2026-02-05 03:46:26 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1788