asgardeo / asgardeo/javascript

Redirect back to original secured route after login

Aperta
#385 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Type/Improvement
Lingua principale
TypeScript
Stelle
18
Fork
67
Merge medio
4h 6m
PR unite (30g)
13

Descrizione

### Current Limitation

When using @asgardeo/react-router, navigating to a secured route without being logged in redirects the user to Asgardeo/IS for authentication.

After successful authentication, the user is redirected to the application root (/) instead of the originally requested secured route. This results in a poor user experience. Ideally, the user should be redirected back to the exact secured route they intended to access.

.

### Suggested Improvement

This can be implemented without changes to Asgardeo/IS by leveraging the OAuth2 state parameter. The SDK can encode the currently active path in the state parameter (only if the route is valid and marked as secured) and restore it after successful authentication

### Please select the package issue is related to

@asgardeo/react-router

### Version

1.1.0

### Reporter Checklist

- [x] I have searched the existing issues and this is not a duplicate.
- [x] I have provided all the necessary information.
- [x] I have verified the improvement is not available in the latest version of the package.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by tracing the secured-route authentication flow in @asgardeo/react-router and how the OAuth2 state parameter is created and handled after login. Confirm how valid secured paths are identified, then verify that a successful login restores the originally requested route instead of /.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
react, typescript
Ambito
authentication, frontend
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.