mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
create_user using user_email
This commit is contained in:
parent
2d353bf284
commit
2a7159c10b
2 changed files with 8 additions and 12 deletions
|
@ -60,7 +60,7 @@ const Createuser: React.FC<CreateuserProps> = ({ userID, accessToken, teams }) =
|
||||||
message.info("Making API Call");
|
message.info("Making API Call");
|
||||||
setIsModalVisible(true);
|
setIsModalVisible(true);
|
||||||
console.log("formValues in create user:", formValues);
|
console.log("formValues in create user:", formValues);
|
||||||
const response = await userCreateCall(accessToken, userID, formValues);
|
const response = await userCreateCall(accessToken, null, formValues);
|
||||||
console.log("user create Response:", response);
|
console.log("user create Response:", response);
|
||||||
setApiuser(response["key"]);
|
setApiuser(response["key"]);
|
||||||
message.success("API user Created");
|
message.success("API user Created");
|
||||||
|
@ -122,23 +122,19 @@ const Createuser: React.FC<CreateuserProps> = ({ userID, accessToken, teams }) =
|
||||||
</Modal>
|
</Modal>
|
||||||
{apiuser && (
|
{apiuser && (
|
||||||
<Modal
|
<Modal
|
||||||
title="Save Your User"
|
title="User Created Successfully"
|
||||||
visible={isModalVisible}
|
visible={isModalVisible}
|
||||||
onOk={handleOk}
|
onOk={handleOk}
|
||||||
onCancel={handleCancel}
|
onCancel={handleCancel}
|
||||||
footer={null}
|
footer={null}
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
Please save this secret user somewhere safe and accessible. For
|
User has been created to access your proxy. Please Ask them to Log In.
|
||||||
security reasons, <b>you will not be able to view it again</b>{" "}
|
|
||||||
through your LiteLLM account. If you lose this secret user, you will
|
|
||||||
need to generate a new one.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{apiuser != null
|
|
||||||
? `API user: ${apiuser}`
|
|
||||||
: "User being created, this might take 30s"}
|
|
||||||
</p>
|
</p>
|
||||||
|
<br></br>
|
||||||
|
|
||||||
|
<p><b>Note: This Feature is only supported through SSO on the Admin UI</b></p>
|
||||||
|
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -158,7 +158,7 @@ export const keyCreateCall = async (
|
||||||
|
|
||||||
export const userCreateCall = async (
|
export const userCreateCall = async (
|
||||||
accessToken: string,
|
accessToken: string,
|
||||||
userID: string,
|
userID: string | null,
|
||||||
formValues: Record<string, any> // Assuming formValues is an object
|
formValues: Record<string, any> // Assuming formValues is an object
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue