mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 06:26:16 +00:00
add automatic SAML redirect
This commit is contained in:
@@ -335,6 +335,10 @@ To login into Infisical with OAuth providers such as Google, configure the assoc
|
|||||||
Requires enterprise license. Please contact [email protected] to get more information.
|
Requires enterprise license. Please contact [email protected] to get more information.
|
||||||
</Accordion>
|
</Accordion>
|
||||||
|
|
||||||
|
<ParamField query="NEXT_PUBLIC_SAML_ORG_SLUG" type="string">
|
||||||
|
Configure SAML organization slug to automatically redirect all users of your Infisical instance to the identity provider.
|
||||||
|
</ParamField>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,18 @@ export const InitialStep = ({ setStep, email, setEmail, password, setPassword }:
|
|||||||
const { config } = useServerConfig();
|
const { config } = useServerConfig();
|
||||||
const queryParams = new URLSearchParams(window.location.search);
|
const queryParams = new URLSearchParams(window.location.search);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (process.env.NEXT_PUBLIC_SAML_ORG_SLUG) {
|
||||||
|
const callbackPort = queryParams.get("callback_port");
|
||||||
|
window.open(
|
||||||
|
`/api/v1/sso/redirect/saml2/organizations/${process.env.NEXT_PUBLIC_SAML_ORG_SLUG}${
|
||||||
|
callbackPort ? `?callback_port=${callbackPort}` : ""
|
||||||
|
}`
|
||||||
|
);
|
||||||
|
window.close();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const handleLogin = async (e: FormEvent<HTMLFormElement>) => {
|
const handleLogin = async (e: FormEvent<HTMLFormElement>) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user