mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-28 10:53:13 +01:00
Feature: Add a show/hide privacy toggle to passwords and secrets in Auth options (#2750)
* mask support for SingleLineEditor * add secret visibility toggle button * move visibility toggle into SingleLineComponent Co-authored-by: Liz MacLean <18120837+lizziemac@users.noreply.github.com> * fix eye button focus state * center enabled and secret toggle * fix input field scales to 100% width * Using a prvacy toggle for all sensitive auth details. * Applied privacy toggle to Collection Auth settings. --------- Co-authored-by: Max Bauer <krummbar@pm.me> Co-authored-by: Liz MacLean <18120837+lizziemac@users.noreply.github.com>
This commit is contained in:
parent
741250068f
commit
c5ec7eea34
@ -138,6 +138,7 @@ const AwsV4Auth = ({ collection }) => {
|
|||||||
onSave={handleSave}
|
onSave={handleSave}
|
||||||
onChange={(val) => handleSecretAccessKeyChange(val)}
|
onChange={(val) => handleSecretAccessKeyChange(val)}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
|
isSecret={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ const BasicAuth = ({ collection }) => {
|
|||||||
onSave={handleSave}
|
onSave={handleSave}
|
||||||
onChange={(val) => handlePasswordChange(val)}
|
onChange={(val) => handlePasswordChange(val)}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
|
isSecret={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</StyledWrapper>
|
</StyledWrapper>
|
||||||
|
@ -37,6 +37,7 @@ const BearerAuth = ({ collection }) => {
|
|||||||
onSave={handleSave}
|
onSave={handleSave}
|
||||||
onChange={(val) => handleTokenChange(val)}
|
onChange={(val) => handleTokenChange(val)}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
|
isSecret={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</StyledWrapper>
|
</StyledWrapper>
|
||||||
|
@ -62,6 +62,7 @@ const DigestAuth = ({ collection }) => {
|
|||||||
onSave={handleSave}
|
onSave={handleSave}
|
||||||
onChange={(val) => handlePasswordChange(val)}
|
onChange={(val) => handlePasswordChange(val)}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
|
isSecret={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</StyledWrapper>
|
</StyledWrapper>
|
||||||
|
@ -78,7 +78,7 @@ const OAuth2AuthorizationCode = ({ collection }) => {
|
|||||||
return (
|
return (
|
||||||
<StyledWrapper className="mt-2 flex w-full gap-4 flex-col">
|
<StyledWrapper className="mt-2 flex w-full gap-4 flex-col">
|
||||||
{inputsConfig.map((input) => {
|
{inputsConfig.map((input) => {
|
||||||
const { key, label } = input;
|
const { key, label, isSecret } = input;
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col w-full gap-1" key={`input-${key}`}>
|
<div className="flex flex-col w-full gap-1" key={`input-${key}`}>
|
||||||
<label className="block font-medium">{label}</label>
|
<label className="block font-medium">{label}</label>
|
||||||
@ -90,6 +90,7 @@ const OAuth2AuthorizationCode = ({ collection }) => {
|
|||||||
onChange={(val) => handleChange(key, val)}
|
onChange={(val) => handleChange(key, val)}
|
||||||
onRun={handleRun}
|
onRun={handleRun}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
|
isSecret={isSecret}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,7 +17,8 @@ const inputsConfig = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'clientSecret',
|
key: 'clientSecret',
|
||||||
label: 'Client Secret'
|
label: 'Client Secret',
|
||||||
|
isSecret: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'scope',
|
key: 'scope',
|
||||||
|
@ -42,7 +42,7 @@ const OAuth2ClientCredentials = ({ collection }) => {
|
|||||||
return (
|
return (
|
||||||
<StyledWrapper className="mt-2 flex w-full gap-4 flex-col">
|
<StyledWrapper className="mt-2 flex w-full gap-4 flex-col">
|
||||||
{inputsConfig.map((input) => {
|
{inputsConfig.map((input) => {
|
||||||
const { key, label } = input;
|
const { key, label, isSecret } = input;
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col w-full gap-1" key={`input-${key}`}>
|
<div className="flex flex-col w-full gap-1" key={`input-${key}`}>
|
||||||
<label className="block font-medium">{label}</label>
|
<label className="block font-medium">{label}</label>
|
||||||
@ -54,6 +54,7 @@ const OAuth2ClientCredentials = ({ collection }) => {
|
|||||||
onChange={(val) => handleChange(key, val)}
|
onChange={(val) => handleChange(key, val)}
|
||||||
onRun={handleRun}
|
onRun={handleRun}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
|
isSecret={isSecret}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,8 @@ const inputsConfig = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'clientSecret',
|
key: 'clientSecret',
|
||||||
label: 'Client Secret'
|
label: 'Client Secret',
|
||||||
|
isSecret: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'scope',
|
key: 'scope',
|
||||||
|
@ -44,7 +44,7 @@ const OAuth2AuthorizationCode = ({ item, collection }) => {
|
|||||||
return (
|
return (
|
||||||
<StyledWrapper className="mt-2 flex w-full gap-4 flex-col">
|
<StyledWrapper className="mt-2 flex w-full gap-4 flex-col">
|
||||||
{inputsConfig.map((input) => {
|
{inputsConfig.map((input) => {
|
||||||
const { key, label } = input;
|
const { key, label, isSecret } = input;
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col w-full gap-1" key={`input-${key}`}>
|
<div className="flex flex-col w-full gap-1" key={`input-${key}`}>
|
||||||
<label className="block font-medium">{label}</label>
|
<label className="block font-medium">{label}</label>
|
||||||
@ -56,6 +56,7 @@ const OAuth2AuthorizationCode = ({ item, collection }) => {
|
|||||||
onChange={(val) => handleChange(key, val)}
|
onChange={(val) => handleChange(key, val)}
|
||||||
onRun={handleRun}
|
onRun={handleRun}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
|
isSecret={isSecret}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,7 +17,8 @@ const inputsConfig = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'clientSecret',
|
key: 'clientSecret',
|
||||||
label: 'Client Secret'
|
label: 'Client Secret',
|
||||||
|
isSecret: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'scope',
|
key: 'scope',
|
||||||
|
@ -150,6 +150,7 @@ const AwsV4Auth = ({ onTokenChange, item, collection }) => {
|
|||||||
onRun={handleRun}
|
onRun={handleRun}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
item={item}
|
item={item}
|
||||||
|
isSecret={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ const BasicAuth = ({ item, collection }) => {
|
|||||||
onRun={handleRun}
|
onRun={handleRun}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
item={item}
|
item={item}
|
||||||
|
isSecret={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</StyledWrapper>
|
</StyledWrapper>
|
||||||
|
@ -43,6 +43,7 @@ const BearerAuth = ({ item, collection }) => {
|
|||||||
onRun={handleRun}
|
onRun={handleRun}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
item={item}
|
item={item}
|
||||||
|
isSecret={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</StyledWrapper>
|
</StyledWrapper>
|
||||||
|
@ -69,6 +69,7 @@ const DigestAuth = ({ item, collection }) => {
|
|||||||
onRun={handleRun}
|
onRun={handleRun}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
item={item}
|
item={item}
|
||||||
|
isSecret={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</StyledWrapper>
|
</StyledWrapper>
|
||||||
|
@ -80,7 +80,7 @@ const OAuth2AuthorizationCode = ({ item, collection }) => {
|
|||||||
return (
|
return (
|
||||||
<StyledWrapper className="mt-2 flex w-full gap-4 flex-col">
|
<StyledWrapper className="mt-2 flex w-full gap-4 flex-col">
|
||||||
{inputsConfig.map((input) => {
|
{inputsConfig.map((input) => {
|
||||||
const { key, label } = input;
|
const { key, label, isSecret } = input;
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col w-full gap-1" key={`input-${key}`}>
|
<div className="flex flex-col w-full gap-1" key={`input-${key}`}>
|
||||||
<label className="block font-medium">{label}</label>
|
<label className="block font-medium">{label}</label>
|
||||||
@ -93,6 +93,7 @@ const OAuth2AuthorizationCode = ({ item, collection }) => {
|
|||||||
onRun={handleRun}
|
onRun={handleRun}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
item={item}
|
item={item}
|
||||||
|
isSecret={isSecret}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,7 +17,8 @@ const inputsConfig = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'clientSecret',
|
key: 'clientSecret',
|
||||||
label: 'Client Secret'
|
label: 'Client Secret',
|
||||||
|
isSecret: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'scope',
|
key: 'scope',
|
||||||
|
@ -43,7 +43,7 @@ const OAuth2ClientCredentials = ({ item, collection }) => {
|
|||||||
return (
|
return (
|
||||||
<StyledWrapper className="mt-2 flex w-full gap-4 flex-col">
|
<StyledWrapper className="mt-2 flex w-full gap-4 flex-col">
|
||||||
{inputsConfig.map((input) => {
|
{inputsConfig.map((input) => {
|
||||||
const { key, label } = input;
|
const { key, label, isSecret } = input;
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col w-full gap-1" key={`input-${key}`}>
|
<div className="flex flex-col w-full gap-1" key={`input-${key}`}>
|
||||||
<label className="block font-medium">{label}</label>
|
<label className="block font-medium">{label}</label>
|
||||||
@ -56,6 +56,7 @@ const OAuth2ClientCredentials = ({ item, collection }) => {
|
|||||||
onRun={handleRun}
|
onRun={handleRun}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
item={item}
|
item={item}
|
||||||
|
isSecret={isSecret}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,8 @@ const inputsConfig = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'clientSecret',
|
key: 'clientSecret',
|
||||||
label: 'Client Secret'
|
label: 'Client Secret',
|
||||||
|
isSecret: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'scope',
|
key: 'scope',
|
||||||
|
@ -45,7 +45,7 @@ const OAuth2AuthorizationCode = ({ item, collection }) => {
|
|||||||
return (
|
return (
|
||||||
<StyledWrapper className="mt-2 flex w-full gap-4 flex-col">
|
<StyledWrapper className="mt-2 flex w-full gap-4 flex-col">
|
||||||
{inputsConfig.map((input) => {
|
{inputsConfig.map((input) => {
|
||||||
const { key, label } = input;
|
const { key, label, isSecret } = input;
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col w-full gap-1" key={`input-${key}`}>
|
<div className="flex flex-col w-full gap-1" key={`input-${key}`}>
|
||||||
<label className="block font-medium">{label}</label>
|
<label className="block font-medium">{label}</label>
|
||||||
@ -58,6 +58,7 @@ const OAuth2AuthorizationCode = ({ item, collection }) => {
|
|||||||
onRun={handleRun}
|
onRun={handleRun}
|
||||||
collection={collection}
|
collection={collection}
|
||||||
item={item}
|
item={item}
|
||||||
|
isSecret={isSecret}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,8 @@ const inputsConfig = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'password',
|
key: 'password',
|
||||||
label: 'Password'
|
label: 'Password',
|
||||||
|
isSecret: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'clientId',
|
key: 'clientId',
|
||||||
@ -17,7 +18,8 @@ const inputsConfig = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'clientSecret',
|
key: 'clientSecret',
|
||||||
label: 'Client Secret'
|
label: 'Client Secret',
|
||||||
|
isSecret: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'scope',
|
key: 'scope',
|
||||||
|
Loading…
Reference in New Issue
Block a user