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
While attempting to integrate a custom SSO provider into Langfuse, I encountered two major issues:
Langfuse does not support an empty AUTH_CUSTOM_CLIENT_SECRET, which is necessary for my SSO provider as it does not require a client secret.
The profile return data from my custom SSO provider is not correctly mapped. For example, firstName, lastName, and emailAddress are not handled as expected.
Details of the Issues:
AUTH_CUSTOM_CLIENT_SECRET Handling:
In my SSO setup, the client secret is not used or provided. However, Langfuse currently does not allow for an empty AUTH_CUSTOM_CLIENT_SECRET value, which prevents me from proceeding with the integration.
I had to modify the logic in auth.ts to allow clientSecret to be empty by setting it to an empty string ("") when it is not defined.
The profile data returned by my SSO provider does not map correctly in the current Langfuse setup. Specifically:
Name fields: The SSO provider returns firstName and lastName, but Langfuse does not handle this format. I had to concatenate firstName and lastName manually in the profile return object.
Email field: The provider uses emailAddress instead of email, which also required manual mapping.
Example profile mapping modification:
profile(profile){return{id: profile.sub,name: profile.firstName+" "+profile.lastName,// Concatenating firstName and lastNameemail: profile.emailAddress,// Using emailAddress instead of emailimage: null,};}
Additional information
Suggested Enhancements:
Support for Empty AUTH_CUSTOM_CLIENT_SECRET:
The ability to have an empty clientSecret should be supported for OAuth providers that do not require a client secret. A more flexible check or configuration option would resolve this issue.
Flexible Profile Mapping:
Langfuse could benefit from additional configuration options or hooks for custom mapping of profile data, allowing users to easily map firstName, lastName, and other custom fields returned by different SSO providers.
Steps to Reproduce:
Set up a custom OAuth provider that does not require a clientSecret.
Attempt to configure the SSO provider with AUTH_CUSTOM_CLIENT_SECRET left blank or empty.
Observe that Langfuse throws an error or prevents the integration.
Try to log in using the custom SSO provider and notice that the profile data is not mapped correctly.
Expected Behavior:
The SSO provider should work without requiring a clientSecret.
The profile data should be correctly mapped from the fields provided by the SSO provider, such as firstName, lastName, and emailAddress.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
While attempting to integrate a custom SSO provider into Langfuse, I encountered two major issues:
AUTH_CUSTOM_CLIENT_SECRET, which is necessary for my SSO provider as it does not require a client secret.firstName,lastName, andemailAddressare not handled as expected.Details of the Issues:
AUTH_CUSTOM_CLIENT_SECRETHandling:AUTH_CUSTOM_CLIENT_SECRETvalue, which prevents me from proceeding with the integration.auth.tsto allowclientSecretto be empty by setting it to an empty string ("") when it is not defined.Example code modification:
Incorrect Profile Data Mapping:
firstNameandlastName, but Langfuse does not handle this format. I had to concatenatefirstNameandlastNamemanually in the profile return object.emailAddressinstead ofemail, which also required manual mapping.Example profile mapping modification:
Additional information
Suggested Enhancements:
Support for Empty
AUTH_CUSTOM_CLIENT_SECRET:clientSecretshould be supported for OAuth providers that do not require a client secret. A more flexible check or configuration option would resolve this issue.Flexible Profile Mapping:
firstName,lastName, and other custom fields returned by different SSO providers.Steps to Reproduce:
clientSecret.AUTH_CUSTOM_CLIENT_SECRETleft blank or empty.Expected Behavior:
clientSecret.firstName,lastName, andemailAddress.Beta Was this translation helpful? Give feedback.
All reactions