julian-alarcon / prospect-mail

Prospect is an Outlook mail desktop client powered by Electron
MIT License
460 stars 66 forks source link

[Bug]: Cannot login, change user agent #329

Closed addy419 closed 6 months ago

addy419 commented 9 months ago

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)

nversluis commented 7 months ago

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

addy419 commented 6 months ago

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.