Azure-Samples / Azure-Samples/ms-identity-docs-code-javascript

BrowserAuthError: monitor_window_timeout in react-spa example application

Ouverte
#108 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
62
Forks
63
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

> Please provide us with the following information:
> ---------------------------------------------------------------

### This issue is for a: (mark with an `x`)
```
- [ x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

### Minimal steps to reproduce
> When the project (react-spa) is ready to be debugged, start the application (e.g. debug in Visual Studio 2022). And as the application has started up then:

1) Sign in as a user
2) Wait until the refresh token expires.
3) Use the 'Request Token'- button to call Microsoft Graph.
4) As the result the problem may or may not occur.

### Any log messages given by the failure
> BrowserAuthError.ts:351 Uncaught (in promise) BrowserAuthError: monitor_window_timeout: Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors
at createBrowserAuthError (BrowserAuthError.ts:351:1)
at SilentHandler.ts:92:1
createBrowserAuthError @ BrowserAuthError.ts:351

### Expected/desired behavior
> After http 400 error a new token would be successfully be fetched in iFrame.

Or this particular application may work correctly if it returns:
:3000/#error=interaction_required&error_description=Session+information+is+not+sufficient+for+single-sign-on.

(InteractionRequiredAuthError: interaction_required: Session information is not sufficient for single-sign-on.)

### OS and Version?
> Windows 10,
### Versions
>

### Mention any other details that might be useful

The 'BrowserAuthError: monitor_window_timeout' does not necessarily occur every time the refresh token has expired. It may also work as expected.

I did save a log when the case was present: the first time it was the monitor_window_timeout that occurred. The second time the refresh token probably was correctly fetched as InteractionRequiredAuthError occurred. I tested this application due to I have used the similar approach to call APIs in my own React project. monitor_window_timeout is often occurring and I tried to run the most simple application with this approach to see is the problem is present.

> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez avec l’application d’exemple react-spa et reproduisez le flux après l’expiration du refresh token : connectez-vous, attendez, puis utilisez le bouton « Request Token ». Examinez les résultats BrowserAuthError monitor_window_timeout et InteractionRequiredAuthError dans les journaux du navigateur ; c’est terminé lorsque le résultat documenté attendu du token ou d’interaction requise se produit systématiquement.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, react
Domaine
authentication, frontend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.