assemblee-virtuelle / assemblee-virtuelle/semapps
[Branche next] erreur lors de la 1ère connexion au SSO les communs
- Dominant language
- TypeScript
- Stars
- 103
- Forks
- 14
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Description
**Décrivez le bug**
Lors de la 1ère connexion via le SSO des communs, une erreur apparaît.
La connexion est cependant ok en retournant sur localhost:5000
**Etapes pour reproduire**
branche next
Supprimer le dossier data
cliquer sur l'icône de connexion puis le lien "se connecter"
la mire de connexion des communs apparaît quelques secondes puis est remplacé par un message d'erreur :
```
Unhandled Rejection (TypeError): Cannot read property 'startsWith' of undefined
(anonymous function)
src/dataProvider/utils/getServerKeyFromUri.js:3
1 | // Return the first server matching with the baseUrl
2 | const getServerKeyFromUri = (uri, dataServers) => {
> 3 | return Object.keys(dataServers).find(key => {
4 | return uri.startsWith(dataServers[key].baseUrl);
5 | });
6 | };
```
En retournant sur localhost:5000 la connexion est ok.
**Captures d'écran**

**Système**
Google Chrome Version 91.0.4472.114 (Build officiel) (64 bits)
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the first SSO login on the next branch after deleting the data directory. Read src/dataProvider/utils/getServerKeyFromUri.js and trace the uri and dataServers values during that flow. Done means the Commons login screen completes without the startsWith error and returning to localhost:5000 still shows a successful connection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100