Repository: lutris/lutris

Issue:
Ubisoft Connect two-factor authentication support
I can't login in Ubisoft Connect through Lutris, because two-factor authentication page can't be loaded.

Steps to reproduce:
1. Enable two-factor authentication in Ubisoft account
2. Install Ubisoft Connect with Lutris
3. Login into Ubisoft Connect account with Lutris
4. Login process stuck on empty page

Video demonstration: https://drive.google.com/file/d/1nFA8aSht7fUNIy8MBNFRGJ8N9KzHhC2W/view?usp=sharing

lutris: 0.5.11-1

```
[System]
OS:              Arch Linux rolling n/a
Arch:            x86_64
Kernel:          5.15.71-1-lts
Desktop:         GNOME
Display Server:  wayland

[CPU]
Vendor:          GenuineIntel
Model:           11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Physical cores:  4
Logical cores:   8

[Memory]
RAM:             15.3 GB
Swap:            4.0 GB

[Graphics]
Vendor:          Intel
OpenGL Renderer: Mesa Intel(R) Xe Graphics (TGL GT2)
OpenGL Version:  4.6 (Compatibility Profile) Mesa 22.1.7
OpenGL Core:     4.6 (Core Profile) Mesa 22.1.7
OpenGL ES:       OpenGL ES 3.2 Mesa 22.1.7
Vulkan:          Supported
```




Discussion:
Have the same problem seems to be 2FA related indeed
Yup same here, gona try to log in without 2FA enabled to see if the issue is still there. Gona post here when i get to home to test this.
I can confirm it works with 2fa disabled 
> I can confirm it works with 2fa disabled

Yup 2FA disabled it works here as well.
@danieljohnson2 Can you do something about that?
I do not feel hopeful. I do not have an Ubisoft account still less two-factor authentication for it. These bug reports do not give me anything I can work with, without that.

Maybe if you guys posted the Lutris debug log ("lutris -d") there would be something. But I did not ask for it because I'm not feeling optimistic on this one.

Indeed, I just now told @strycore not to hold the next release over this one. Too many fixes waiting to go out to wait for someone to figure out this one.

Resolving patch:
diff --git a/lutris/util/ubisoft/client.py b/lutris/util/ubisoft/client.py
--- a/lutris/util/ubisoft/client.py
+++ b/lutris/util/ubisoft/client.py
@@ -9,7 +9,7 @@
 import requests
 
 from lutris.util.log import logger
-from lutris.util.ubisoft.consts import CHROME_USERAGENT, CLUB_APPID, UBISOFT_APPID
+from lutris.util.ubisoft.consts import CHROME_USERAGENT, CLUB_APPID
 
 
 def parse_date(date_str):
@@ -105,7 +105,7 @@ def _do_request_safe(self, method, *args, **kwargs):
     def _do_options_request(self):
         self._do_request('options', "https://public-ubiservices.ubi.com/v3/profiles/sessions", headers={
             "Origin": "https://connect.ubisoft.com",
-            "Referer": f"https://connect.ubisoft.com/login?appId={UBISOFT_APPID}",
+            "Referer": f"https://connect.ubisoft.com/",
             "User-Agent": CHROME_USERAGENT,
         })
 
diff --git a/lutris/util/ubisoft/consts.py b/lutris/util/ubisoft/consts.py
--- a/lutris/util/ubisoft/consts.py
+++ b/lutris/util/ubisoft/consts.py
@@ -12,11 +12,10 @@
     "Chrome/72.0.3626.121 Safari/537.36"
 )
 
-CLUB_GENOME_ID = "fbd6791c-a6c6-4206-a75e-77234080b87b"
-UBISOFT_APPID = "b8fde481-327d-4031-85ce-7c10a202a700"
+CLUB_GENOME_ID = "85c31714-0941-4876-a18d-2c7e9dce8d40"
 CLUB_APPID = "314d4fef-e568-454a-ae06-43e3bece12a6"
 
 LOGIN_URL = (
-    f"https://connect.ubisoft.com/login?appId={UBISOFT_APPID}&genomeId={CLUB_GENOME_ID}"
+    f"https://connect.ubisoft.com/login?appId={CLUB_APPID}&genomeId={CLUB_GENOME_ID}"
     "&lang=en-US&nextUrl=https:%2F%2Fconnect.ubisoft.com%2Fready"
 )


Test patch: