mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 03:48:09 +01:00
Adds LDAP auth support
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { useEffect, useRef } from "react";
|
||||
|
||||
import {
|
||||
Box,
|
||||
Center,
|
||||
Flex,
|
||||
Box,
|
||||
FormControl,
|
||||
FormErrorMessage,
|
||||
FormLabel,
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
useColorModeValue,
|
||||
useToast,
|
||||
} from "@chakra-ui/react";
|
||||
import { Formik, Form, Field } from "formik";
|
||||
import { Field, Form, Formik } from "formik";
|
||||
|
||||
import { LocalePicker, PrettyButton, ThemeSwitcher } from "src/components";
|
||||
import { useAuthState } from "src/context";
|
||||
@@ -40,7 +40,7 @@ function Login() {
|
||||
};
|
||||
|
||||
try {
|
||||
await login(values.email, values.password);
|
||||
await login("local", values.email, values.password);
|
||||
} catch (err) {
|
||||
if (err instanceof Error) {
|
||||
showErr(err.message);
|
||||
|
||||
@@ -7,14 +7,14 @@ import {
|
||||
FormControl,
|
||||
FormErrorMessage,
|
||||
FormLabel,
|
||||
Stack,
|
||||
Heading,
|
||||
Input,
|
||||
Stack,
|
||||
useColorModeValue,
|
||||
useToast,
|
||||
} from "@chakra-ui/react";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import { Formik, Form, Field } from "formik";
|
||||
import { Field, Form, Formik } from "formik";
|
||||
|
||||
import { createUser } from "src/api/npm";
|
||||
// import logo from "src/assets/logo-256.png";
|
||||
@@ -42,7 +42,7 @@ function Setup() {
|
||||
...{
|
||||
isDisabled: false,
|
||||
auth: {
|
||||
type: "password",
|
||||
type: "local",
|
||||
secret: values.password,
|
||||
},
|
||||
capabilities: ["full-admin"],
|
||||
@@ -65,7 +65,7 @@ function Setup() {
|
||||
const response = await createUser(payload);
|
||||
if (response && typeof response.id !== "undefined" && response.id) {
|
||||
try {
|
||||
await login(response.email, password);
|
||||
await login("local", response.email, password);
|
||||
// Trigger a Health change
|
||||
await queryClient.refetchQueries({ queryKey: ["health"] });
|
||||
// window.location.reload();
|
||||
|
||||
Reference in New Issue
Block a user