julian-alarcon / prospect-mail

Prospect is an Outlook mail desktop client powered by Electron

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Cannot login, change user agent

addy419 opened this issue · comments

Describe the bug
My organisation has locked the authentication process for 365 accounts based on user agent. For example, if the user agent is windows, the login needs to be done on a system wide level. Hence, I would like to change my user agent to linux (it defaults to windows on prospect mail)

  • OS: Ubuntu 22.04 LTS
  • Installation source: snap
  • Version: 0.5.3

I am experiencing the exact same issue and would like to apply the same fix. I can help with testing if needed.

I fixed it with the following steps:

git clone https://github.com/julian-alarcon/prospect-mail.git
cd prospect-mail

If you are on ubuntu:

# Install Node
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_21.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt update
sudo apt install nodejs -y

# Install Yarn
npm install --global yarn

# Install other dependencies
yarn add electron-builder --dev
npm install electron-settings

# Make changes
# Edit Line 29 in package.json to your node version (^21.7 for me)
# Edit Line 99 in src/controller/mail-window-controller.js to your desired User Agent

# Build
yarn dist:linux:deb #Or any other version you want

# Install deb file by opening it with your package manager, you can also make a snap or tar.gz and install it manually.