Skip to content

Commit

Permalink
[gh-#1032] autoComplete="new-password" (#1049)
Browse files Browse the repository at this point in the history
* [gh-#1032] autoComplete="new-password"

* [gh-#1032] remove form autoComplete off
  • Loading branch information
khaliqgant authored Sep 29, 2023
1 parent c61b9e7 commit 456e95c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
5 changes: 4 additions & 1 deletion packages/webapp/src/pages/ConnectionCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ nango.auth('${integration?.uniqueKey}', '${connectionId}'${connectionConfigStr})
<div className="mx-auto w-largebox pb-40">
<h2 className="mx-20 mt-16 text-left text-3xl font-semibold tracking-tight text-white mb-12">Add New Connection</h2>
<div className="mx-20 h-fit border border-border-gray rounded-md text-white text-sm py-14 px-8">
<form className="space-y-6" onSubmit={handleCreate} autoComplete="off">
<form className="space-y-6" onSubmit={handleCreate}>
<div>
<div>
<div className="flex">
Expand Down Expand Up @@ -346,6 +346,7 @@ nango.auth('${integration?.uniqueKey}', '${connectionId}'${connectionConfigStr})
name="connection_id"
type="text"
defaultValue={connectionId}
autoComplete="new-password"
required
className="border-border-gray bg-bg-black text-text-light-gray focus:border-white focus:ring-white block h-11 w-full appearance-none rounded-md border px-3 py-2 text-base placeholder-gray-400 shadow-sm focus:outline-none"
onChange={handleConnectionIdChange}
Expand Down Expand Up @@ -409,6 +410,7 @@ nango.auth('${integration?.uniqueKey}', '${connectionId}'${connectionConfigStr})
name={`connection-config-${paramName}`}
type="text"
required
autoComplete="new-password"
className="border-border-gray bg-bg-black text-text-light-gray focus:border-white focus:ring-white block h-11 w-full appearance-none rounded-md border px-3 py-2 text-base placeholder-gray-400 shadow-sm focus:outline-none"
onChange={handleConnectionConfigParamsChange}
/>
Expand Down Expand Up @@ -518,6 +520,7 @@ nango.auth('${integration?.uniqueKey}', '${connectionId}'${connectionConfigStr})
id="authorization_params"
name="authorization_params"
type="text"
autoComplete="new-password"
defaultValue="{ }"
className={`${authorizationParamsError ? 'border-red-700' : 'border-border-gray'} ${
authorizationParamsError ? 'text-red-700' : 'text-text-light-gray'
Expand Down
4 changes: 3 additions & 1 deletion packages/webapp/src/pages/IntegrationCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export default function IntegrationCreate() {
: 'Add New Integration'}
</h2>
<div className="mx-20 h-fit border border-border-gray rounded-md text-white text-sm py-14 px-8">
<form className="space-y-6" onSubmit={handleSave} autoComplete="off">
<form className="space-y-6" onSubmit={handleSave}>
{!providerConfigKey && providers && (
<div>
<div>
Expand Down Expand Up @@ -244,6 +244,7 @@ export default function IntegrationCreate() {
id="unique_key"
name="unique_key"
type="text"
autoComplete="new-password"
required
defaultValue={selectedProvider}
minLength={1}
Expand Down Expand Up @@ -304,6 +305,7 @@ export default function IntegrationCreate() {
name="client_id"
type="text"
defaultValue={integration ? integration.client_id : ''}
autoComplete="new-password"
required
minLength={1}
className="border-border-gray bg-bg-black text-text-light-gray focus:border-white focus:ring-white block h-11 w-full appearance-none rounded-md border px-3 py-2 text-base placeholder-gray-400 shadow-sm focus:outline-none"
Expand Down
12 changes: 8 additions & 4 deletions packages/webapp/src/pages/ProjectSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,12 @@ export default function ProjectSettings() {
</div>
</div>
{callbackEditMode && (
<form className="mt-2" onSubmit={handleCallbackSave} autoComplete="off">
<form className="mt-2" onSubmit={handleCallbackSave}>
<div className="flex">
<input
id="callback_url"
name="callback_url"
autoComplete="new-password"
type="url"
defaultValue={callbackUrl}
className="border-border-gray bg-bg-black text-text-light-gray focus:ring-blue block h-11 w-full appearance-none rounded-md border px-3 py-2 text-base placeholder-gray-600 shadow-sm focus:border-blue-500 focus:outline-none"
Expand Down Expand Up @@ -535,11 +536,12 @@ export default function ProjectSettings() {
</Tooltip>
</div>
{webhookEditMode && (
<form className="mt-2" onSubmit={handleWebhookbackSave} autoComplete="off">
<form className="mt-2" onSubmit={handleWebhookbackSave}>
<div className="flex">
<input
id="webhook_url"
name="webhook_url"
autoComplete="new-password"
type="url"
defaultValue={webhookUrl}
className="border-border-gray bg-bg-black text-text-light-gray focus:ring-blue block h-11 w-full appearance-none rounded-md border px-3 py-2 text-base placeholder-gray-600 shadow-sm focus:border-blue-500 focus:outline-none"
Expand Down Expand Up @@ -612,11 +614,12 @@ export default function ProjectSettings() {
</div>
)}
{hmacEditMode && (
<form className="mt-2" onSubmit={handleHmacSave} autoComplete="off">
<form className="mt-2" onSubmit={handleHmacSave}>
<div className="flex">
<input
id="hmac_key"
name="hmac_key"
autoComplete="new-password"
type="text"
defaultValue={hmacKey}
className="border-border-gray bg-bg-black text-text-light-gray focus:ring-blue block h-11 w-full appearance-none rounded-md border px-3 py-2 text-base placeholder-gray-600 shadow-sm focus:border-blue-500 focus:outline-none"
Expand Down Expand Up @@ -666,14 +669,14 @@ export default function ProjectSettings() {
<form
className="mt-2"
onSubmit={handleEnvVariablesSave}
autoComplete="off"
>
{envVariables.map((envVar, index) => (
<div key={index} className="flex items-center mt-2">
<input
id={`env_var_name_${index}`}
name={`env_var_name_${index}`}
defaultValue={envVar.name}
autoComplete="new-password"
required
type="text"
className="border-border-gray bg-bg-black text-text-light-gray focus:ring-blue block h-11 w-full appearance-none rounded-md border text-base placeholder-gray-600 shadow-sm focus:border-blue-500 focus:outline-none mr-3"
Expand All @@ -683,6 +686,7 @@ export default function ProjectSettings() {
name={`env_var_value_${index}`}
defaultValue={envVar.value}
required
autoComplete="new-password"
type="password"
onMouseEnter={(e) => e.currentTarget.type = 'text'}
onMouseLeave={(e) => {
Expand Down

0 comments on commit 456e95c

Please # to comment.