SSO Sign In does not handle redirect to callbackUrl set in function

const handleSSOSignIn = async () => {
    try {
      await authClient.signIn.sso({
        organizationSlug: orgSlug,
        callbackURL: '/select-organization'
      })
    } catch (error) {
      console.error('SSO sign-in error:', error)
      form.setError('root', { message: 'Failed to sign in with SSO' })
    }
  }


redirects to http://localhost:3000/api/auth/sso/saml2/callback/<providerId>

with this json:
{"redirect":true,"url":"https://login.microsoftonline.com/<tenantId>/saml2/dashboard"}
Was this page helpful?