Replies: 1 comment
-
To get to the bottom of the problem a little further, I tried to rebuild the OAuth provider, or rather the login process, using Flet and Keyclock "on-board" (builtin) resources. In doing so, I also encountered problems, although these were described in more detail. The problem was the integration of my CA certificates. Unfortunately, "from flet.auth import OAuthProvider" simply failed, but did not display the actual "error". I had always assumed that I could either integrate my CA certificate via the environment variable "REQUESTS_CA_BUNDLE" or that the certificates would be read in via the Python SSL framework. I have therefore adapted the PEM file "ssl/cert.pem" accordingly in my Python environment. Or, everytime I re-built my Python virtual env this cert.pem was re-built automatically as my own CA cert is/was part of my Linux environment already. However, this does not apply to Flet (and perhaps to all Python web frameworks). Here, however, the certificates are verified with a different framework (certifi) and thus against a different authority: "lib/python3.1/site-packages/certifi/cacert.pem". If you now adapt this PEM file, access from Flet also works against my TLS-secured Keycloak. Maybe that's obvious? Unfortunately, I was not aware of this. I hope this information helps others who would also like to secure Flet with TLS. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
As in my Bug report #3045 mentioned I think there is a problem with certificate handling in Flet.
Has anyone ever connected Flet together with NGINX and TLS certificates to TLS secured IDM (e.g. Keycloak)?
Code sample
Error message
------------------------------------------------------
Beta Was this translation helpful? Give feedback.
All reactions