Closed dkzkv closed 2 weeks ago
It's actually "as designed". Using OAuth doesn't make sense with a standalone desktop app as secret key comes with the app and any user could retrieve it.
What could work though is Flet desktop app that works with a remote web server keeping secret keys and controlling auth process.
What is your deployment scenario here?
✅ Checked Issues
✅ Checked Stackoverflow
ℹ️ Description
Authentication in desktop mode does not work.
🤖 Code example to reproduce the issue:
⚠️ Actual result:
When calling the function
await page.login_async(google_provider)
, I get the following error:🥳 Expected result:
The function should open a window with google authentication in the browser (docs)
⭐️ Additional information:
Attempt to fix 1
if i add
ft.FLET_APP_WEB
:Then the authentication works, it redirects me to the browser and after authentication redirects me back to the application. BUT: but it only works if I run the application from the IDE. If I try to build an application 'flet build macos' and then authenticate...i get same error
Exception: oauthAuthorize command is not supported.
.Attempt to fix 2
Building
flet build macos
withthis leads to the fact that after the start of the application, an empty screen is displayed and the controllers are not loaded (apparently some kind of internal logic)
Flet version::
flet=0.22.0 Python version 3.11.6 Operating system:
Macos M2 Sonoma 14.4.1 Build command: flet build macos