SUBTASK #86: Login screen and signed-in layout
I maintainer di solito rispondono entro 1 giorno
@Solo-Her0 ci sta già lavorando.
Dal 2/11/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 28/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, react
- Ambito
- authentication, authorization, frontend
Direzione di ricerca
Start by confirming the scan screen (#52) and sessions and route protection (#90) are merged, since frontend/app/ and the /api/login, /api/logout and /api/me endpoints come from them. Then read frontend/app/src/api.js, Layout.jsx and App.jsx to see where the 401 handling and routes go. Done means signed-out visits land on /login, role-hidden controls work, and npm run build and npm run lint pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What to do
The React side of signing in: a login screen, sign-in state the whole app can read, a redirect to the login screen for anyone signed out, the signed-in user and a Sign out button in the header, and controls hidden when the user's role can't use them.
Background
- Spec SEC-01, SEC-03, NFR-01
- The React app,
Layout.jsx,api.jsand the message display (SH-5) come from the scan screen (#52) - The endpoints are subtask 4:
POST /api/login,POST /api/logout,GET /api/me
Steps
-
pages/LoginPage.jsxat/login:- Username field, and password field with
type="password"andautocomplete="current-password" - The Sign in button is disabled while waiting, and the server's reason is shown through the message display (SH-5)
- Username field, and password field with
-
auth/AuthProvider.jsxand auseAuth()hook:- On start, asks
GET /api/me - Holds the user and their permissions; offers
login(),logout()andcan(permission)
- On start, asks
-
auth/RequireAuth.jsxaround every page except/login:- Shows "Loading…" while checking
- Signed out: redirects to
/login?next=<the page>. After signing in, goes tonextonly if it starts with/, so a link like?next=https://another-site.comcan't send users elsewhere.
-
api.js: any 401 clears the user and goes to/loginwith "Your session ended. Sign in again." -
Layout.jsxheader: the username, the role and a Sign out button - Controls the role can't use are hidden with
can(...)(e.g. Start scan for a viewer). The server still checks. - Never put the password or the user in
localStorage. The session cookie is HttpOnly, so the page can't read it anyway.
Where
frontend/app/src/pages/LoginPage.jsxfrontend/app/src/auth/AuthProvider.jsx,frontend/app/src/auth/RequireAuth.jsxfrontend/app/src/api.js,frontend/app/src/Layout.jsx,frontend/app/src/App.jsx(routes)
Done when
- Opening any page signed out goes to the login screen; after signing in, you land on the page you asked for
- A wrong password shows "Username or password is incorrect." and doesn't clear the username
- A viewer doesn't see Start scan; an editor does
- Sign out returns to the login screen, and the Back button doesn't show data
- After 30 minutes without activity, the next click goes to the login screen with the "session ended" message
-
npm run buildandnpm run lintpass with no new warnings
Depends on
- Sessions and route protection (#90)
- Scan screen and message display (#52), which sets up
frontend/app/
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 1
- Merge medio
- 9h 31m
- PR unite (30g)
- 36
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Bearkat-Professionals/Software-Engineering-Project
-
SUBTASK #86: Password hashing (BB-5)Forse già presa @Edgeless6 l’ha presa 2 giorni fa. Apertabackend Low Priority subtask
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Bearkat-Professionals/Software-Engineering-Project#87 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Enhancement: Regression tests for Validate Input crash fixes (SH-1)Forse già presa @yoshi301 l’ha presa 1 giorno fa. Apertabackend Low Priority
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Bearkat-Professionals/Software-Engineering-Project#59 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
SUBTASK #86: Manage user accounts (admin)Forse già presa @Edgeless6 l’ha presa 2 giorni fa. Apertabackend Low Priority subtask
Difficoltà 4/5 Più di una settimana Idoneità per principianti 20/100
Bearkat-Professionals/Software-Engineering-Project#92 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
SUBTASK #86: Sessions and route protection in the Application Controller (2.0)Forse già presa @javi120467 l’ha presa 2 giorni fa. Apertabackend Low Priority security subtask
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
Bearkat-Professionals/Software-Engineering-Project#90 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
SUBTASK #86: Sign in and account rules (2.1)Forse già presa @PavlockBlaine03 l’ha presa 2 giorni fa. Apertabackend Low Priority subtask
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
Bearkat-Professionals/Software-Engineering-Project#89 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Bearkat-Professionals/Software-Engineering-Project
Issue simili
-
Server mode OAuth2: 'NoneType' object is not subscriptable on every request after re-submitting the OAuth2 login while already logged inForse già presa @Rarasinhoo l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
pgadmin-org/pgadmin4#10733 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
aws-samples/sample-per-model-bedrock#752 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
int-brain-lab/mpci#32 ·
-
area:docs priority:p2 type:docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jejjohnson/geostack#120 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
sublimelsp/LSP-vue#203 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno