You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I defined a third-party ssoprovider myself and added the provider using from chainlit.oauth_providers import providers. Jumping to the login page has been implemented. However, when I clicked to log in, my custom oauth_callback() method failed to receive the request, which was automatically sent to chainlit's own oauth_callback(), preventing me from changing the logon logic.
To Reproduce
Steps to reproduce the behavior:
1.my provider:
`class FooBarProvider(OAuthProvider):
id="your-id"
env=["YOUR_ENV_VAR_NAMES"]
@nestorcolt-clv Yes,Yes, I thought there was something wrong with my program at first, but after checking it, it didn't work. I wonder if there is a way to solve this problem,I need support our SSO(Oauth2) systemctl.
Describe the bug
I defined a third-party ssoprovider myself and added the provider using from chainlit.oauth_providers import providers. Jumping to the login page has been implemented. However, when I clicked to log in, my custom oauth_callback() method failed to receive the request, which was automatically sent to chainlit's own oauth_callback(), preventing me from changing the logon logic.
To Reproduce
Steps to reproduce the behavior:
1.my provider:
`class FooBarProvider(OAuthProvider):
id="your-id"
env=["YOUR_ENV_VAR_NAMES"]
2.inject_custom_auth.py
...... def add_custom_oauth_provider(provider_id: str, custom_provider_instance): if custom_oauth_enabled() and not provider_id_in_instance_list(provider_id): providers.append(custom_provider_instance) print(f"Added provider: {provider_id}") else: print(f"Custom OAuth is not enabled or provider {provider_id} already exists")
3.injection app.py
`from cookbook.auth.foobar_oauthprovider import FooBarProvider
from cookbook.auth.inject_custom_auth import add_custom_oauth_provider
add_custom_oauth_provider("foobar", FooBarProvider())
@cl.oauth_callback
def oauth_callback(
provider_id: str,
token: str,
raw_user_data: Dict[str, str],
default_user: cl.User,
) -> Optional[cl.User]:
return default_user `
Expected behavior
A clear and concise description of what you expected to happen.
oauth_callback() can recive callback and modify logic
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: