Skip to content

Commit

Permalink
fix: password printed in console
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniomuso committed Oct 18, 2024
1 parent 93480f5 commit e58c353
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 36 deletions.
55 changes: 55 additions & 0 deletions app-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
app:
title: Backstage Example App
baseUrl: http://localhost:3000
#datadogRum:
# clientToken: '123456789'
# applicationId: qwerty
# site: # datadoghq.eu default = datadoghq.com
# env: # optional
support:
url: https://github.com/backstage/backstage/issues # Used by common ErrorPage
items: # Used by common SupportButton component
- title: Issues
icon: github
links:
- url: https://github.com/backstage/backstage/issues
title: GitHub Issues
- title: Discord Chatroom
icon: chat
links:
- url: https://discord.gg/MUpMjP2
title: '#backstage'

backend:
# Used for enabling authentication, secret is shared by all backend plugins
# See https://backstage.io/docs/tutorials/backend-to-backend-auth for
# information on the format
# auth:
# keys:
# - secret: ${BACKEND_SECRET}
baseUrl: http://localhost:7007
listen:
port: 7007
database:
client: better-sqlite3
connection: ':memory:'
cache:
store: memory
cors:
origin: http://localhost:3000
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
credentials: true
csp:
connect-src: ["'self'", 'http:', 'https:']
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
# Default Helmet Content-Security-Policy values can be removed by setting the key to false
reading:
allow:
- host: example.com
- host: '*.mozilla.org'
- host: gitlab.com
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir

integrations:
gitlab:
- host: gitlab.com
77 changes: 41 additions & 36 deletions packages/ldap-auth/src/components/LoginPage/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,42 +93,47 @@ export const LoginForm = ({
<Content>
<Container maxWidth="sm">
<Paper elevation={4} className={classes.paper}>
<TextField
required
label={usernameLabel || 'LDAP Name'}
onChange={(e) => setUsername(e.target.value)}
value={username}
id="username"
error={uError}
helperText={helperTextUsername}
fullWidth
size="small"
margin="dense"
/>
<TextField
required
label="Password"
onChange={(e) => setPassword(e.target.value)}
value={password}
id="password"
type="password"
error={pError}
helperText={helperTextPassword}
fullWidth
size="small"
margin="dense"
/>
<Button
variant="contained"
color="primary"
size="large"
fullWidth
onClick={onClick}
type="submit"
style={{ marginTop: 16 }}
>
Login
</Button>
<form onSubmit={(e) => e.preventDefault()}>
<TextField
required
label={usernameLabel || 'LDAP Name'}
onChange={(e) => setUsername(e.target.value)}
value={username}
type="username"
autoComplete="username"
id="username"
error={uError}
helperText={helperTextUsername}
fullWidth
size="small"
margin="dense"
/>
<TextField
required
label="Password"
onChange={(e) => setPassword(e.target.value)}
value={password}
id="password"
type="password"
autoComplete="password"
error={pError}
helperText={helperTextPassword}
fullWidth
size="small"
margin="dense"
/>
<Button
variant="contained"
color="primary"
size="large"
fullWidth
onClick={onClick}
type="submit"
style={{ marginTop: 16 }}
>
Login
</Button>
</form>
</Paper>
</Container>
</Content>
Expand Down

0 comments on commit e58c353

Please sign in to comment.