Client:PortalSettings:OAuth2: fix copy client id and client secret
This commit is contained in:
parent
20c3d69d42
commit
86ed0acd04
@ -13,6 +13,7 @@
|
|||||||
"AuthorizeLink": "Authorize link",
|
"AuthorizeLink": "Authorize link",
|
||||||
"AuthenticationMethod": "Authentication method",
|
"AuthenticationMethod": "Authentication method",
|
||||||
"Client": "Client",
|
"Client": "Client",
|
||||||
|
"ClientCopy": "Client id successfully copied to clipboard",
|
||||||
"Creator": "Creator",
|
"Creator": "Creator",
|
||||||
"ClientHelpButton": "Credentials for using OAth 2.0 as your Authentication type.<br/> <strong>Note</strong>: Any enterprise admin who knows the app's client ID will be able to retrieve information about the app including app name, authentication type, app scopes and redirect URI.",
|
"ClientHelpButton": "Credentials for using OAth 2.0 as your Authentication type.<br/> <strong>Note</strong>: Any enterprise admin who knows the app's client ID will be able to retrieve information about the app including app name, authentication type, app scopes and redirect URI.",
|
||||||
"CodeVerifier": "Code verifier",
|
"CodeVerifier": "Code verifier",
|
||||||
@ -46,6 +47,7 @@
|
|||||||
"RevokeConsentLogin": "If you want to renew an automatic login into {{name}} using ONLYOFFICE DocSpace, you will be asked to grant access to your DocSpace account data.",
|
"RevokeConsentLogin": "If you want to renew an automatic login into {{name}} using ONLYOFFICE DocSpace, you will be asked to grant access to your DocSpace account data.",
|
||||||
"RevokeConsentLoginGroup": "If you want to renew an automatic login using ONLYOFFICE DocSpace, you will be asked to grant access to your DocSpace account data.",
|
"RevokeConsentLoginGroup": "If you want to renew an automatic login using ONLYOFFICE DocSpace, you will be asked to grant access to your DocSpace account data.",
|
||||||
"Secret": "Secret",
|
"Secret": "Secret",
|
||||||
|
"SecretCopy": "Client secret successfully copied to clipboard",
|
||||||
"SelectNewImage": "Select new image",
|
"SelectNewImage": "Select new image",
|
||||||
"Scopes": "Scopes",
|
"Scopes": "Scopes",
|
||||||
"ScopesHeader": "Access scopes",
|
"ScopesHeader": "Access scopes",
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Trans } from "react-i18next";
|
import { Trans } from "react-i18next";
|
||||||
|
import copy from "copy-to-clipboard";
|
||||||
|
|
||||||
|
//@ts-ignore
|
||||||
|
import toastr from "@docspace/components/toast/toastr";
|
||||||
|
|
||||||
import { StyledBlock, StyledInputBlock } from "../ClientForm.styled";
|
import { StyledBlock, StyledInputBlock } from "../ClientForm.styled";
|
||||||
|
|
||||||
@ -32,6 +36,16 @@ const ClientBlock = ({
|
|||||||
|
|
||||||
const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {};
|
const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {};
|
||||||
|
|
||||||
|
const onCopyClick = (name: string) => {
|
||||||
|
if (name === "id") {
|
||||||
|
copy(value[name]);
|
||||||
|
toastr.success(t("ClientCopy"));
|
||||||
|
} else {
|
||||||
|
copy(value[name]);
|
||||||
|
toastr.success(t("SecretCopy"));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const helpButtonText = <Trans t={t} i18nKey="ClientHelpButton" ns="OAuth" />;
|
const helpButtonText = <Trans t={t} i18nKey="ClientHelpButton" ns="OAuth" />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -46,6 +60,7 @@ const ClientBlock = ({
|
|||||||
error={""}
|
error={""}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
withCopy
|
withCopy
|
||||||
|
onCopyClick={() => onCopyClick("id")}
|
||||||
/>
|
/>
|
||||||
<InputGroup
|
<InputGroup
|
||||||
label={t("Secret")}
|
label={t("Secret")}
|
||||||
@ -58,6 +73,7 @@ const ClientBlock = ({
|
|||||||
isPassword
|
isPassword
|
||||||
buttonLabel={t("Reset")}
|
buttonLabel={t("Reset")}
|
||||||
onButtonClick={onResetClick}
|
onButtonClick={onResetClick}
|
||||||
|
onCopyClick={() => onCopyClick("secret")}
|
||||||
/>
|
/>
|
||||||
</StyledInputBlock>
|
</StyledInputBlock>
|
||||||
</StyledBlock>
|
</StyledBlock>
|
||||||
|
Loading…
Reference in New Issue
Block a user