diff --git a/packages/cli/src/sso/saml/routes/saml.controller.ee.ts b/packages/cli/src/sso/saml/routes/saml.controller.ee.ts index e7c73200b6..d51adec3a2 100644 --- a/packages/cli/src/sso/saml/routes/saml.controller.ee.ts +++ b/packages/cli/src/sso/saml/routes/saml.controller.ee.ts @@ -26,7 +26,6 @@ import { } from '../service-provider.ee'; import type { SamlLoginBinding } from '../types'; import { SamlConfiguration } from '../types/requests'; -import { getInitSSOFormView } from '../views/init-sso-post'; @RestController('/sso/saml') export class SamlController { @@ -207,7 +206,7 @@ export class SamlController { if (result?.binding === 'redirect') { return result.context.context; } else if (result?.binding === 'post') { - return res.send(getInitSSOFormView(result.context as PostBindingContext)); + return res.render('sso/saml-init-form', result.context); } else { throw new AuthError('SAML redirect failed, please check your SAML configuration.'); } diff --git a/packages/cli/src/sso/saml/views/init-sso-post.ts b/packages/cli/src/sso/saml/views/init-sso-post.ts deleted file mode 100644 index 4df6719efb..0000000000 --- a/packages/cli/src/sso/saml/views/init-sso-post.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { PostBindingContext } from 'samlify/types/src/entity'; - -export function getInitSSOFormView(context: PostBindingContext): string { - return ` -
-`; -} diff --git a/packages/cli/templates/sso/saml-init-form.handlebars b/packages/cli/templates/sso/saml-init-form.handlebars new file mode 100644 index 0000000000..af6bc23ba8 --- /dev/null +++ b/packages/cli/templates/sso/saml-init-form.handlebars @@ -0,0 +1,16 @@ + + + + + +