Invalid origin error with SSO login

Hey! I'm using the Better Auth SSO plugin and I’m running into an issue where SSO login fails because the callback gets rejected with this error:

ERROR [Better Auth]: Invalid origin: https://abc.okta.com/


I’m aiming to support any SAML provider, so I don’t want to hard code specific domains like Okta into trustedOrigins. Right now it only works if I add something like *.okta.com.

Is there a way to handle this more dynamically or properly configure it so any SAML provider works without hard coding domains?
Was this page helpful?