dnplus / streamlit-oauth

Simple OAuth Component for Streamlit App
MIT License
144 stars 23 forks source link

Error with Kinde access token #32

Closed lubauss closed 5 months ago

lubauss commented 6 months ago

Hi,

I seem to be getting an error with the Kinde OAuth during the Client Authentication.

GetAccessTokenError: {'error': 'invalid_client', 'error_description': 'Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method).'}
Traceback:
File "/Users/luismi/STREAMLIT_APPS/questmind-ui-v0/QUESTMIND-UI-V0/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script
    exec(code, module.__dict__)
File "/Users/luismi/STREAMLIT_APPS/questmind-ui-v0/app/pages/5_kinde_OAuth.py", line 46, in <module>
    result = oauth2.authorize_button(
             ^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/luismi/STREAMLIT_APPS/questmind-ui-v0/QUESTMIND-UI-V0/lib/python3.11/site-packages/streamlit_oauth/__init__.py", line 107, in authorize_button
    result['token'] = asyncio.run(self.client.get_access_token(**args))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.8/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.8/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.8/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
File "/Users/luismi/STREAMLIT_APPS/questmind-ui-v0/QUESTMIND-UI-V0/lib/python3.11/site-packages/httpx_oauth/oauth2.py", line 148, in get_access_token
    raise GetAccessTokenError(data)

I know that my Kinde sign up is working because I got the user data, but maybe something changed in the past few months that now prevents the client from being authenticated.

Screenshot 2024-04-04 at 8 31 06 PM
dnplus commented 5 months ago

Not sure the kinde detail oauth flow.

But the error shows "Client authentication failed", make sure your client_id, client_secret is placed and valid.

dnplus commented 5 months ago

no update