Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

At each authentication also all past codeVerifier are used to get the credential #468

Open
matteo-cristino opened this issue Sep 25, 2024 · 2 comments

Comments

@matteo-cristino
Copy link
Contributor

When doing more than n consequent authentication it can be seen that at the n-th authentication call token endpoint n time where the first n-1 fails and have in them the codeVerifier of the previous authentications, e.g.
image

Looking at the code it seems to me that here

window.addEventListener('message', async function (event) {
if (event.origin === window.location.origin) return;
try {
code = JSON.parse(event.data).code;
await getCredential();
} catch {
feedback = {
type: 'error',
message: event.data,
feedback: 'Error authenticating with the service. Please try again.'
};
content.scrollToTop();
}
});

eventListeners are added, but then never removed and this causes the multiple call on each authentication,

@matteo-cristino
Copy link
Contributor Author

This issue is still present Image

@puria
Copy link
Member

puria commented Dec 8, 2024

The fix caf4bd0 seems good but was part of a fix tabbar branch in a draft PR that was closed without being merged... and never part of the actual codebase!
Maybe you want to cherrypick the commit and open PR just to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants