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

fix: replace Math.random with crypto #138 #140

Merged

Conversation

doatech
Copy link
Contributor

@doatech doatech commented Mar 23, 2021

Fix for: #138

I replaced Math.random with window.crypto.getRandomValues and configured jest to test the randomString function correctly with the new globals.

Please consider if fallback is needed for gerRandomValues, the coverage is quite good otherwise: caniuse.com

@doatech doatech changed the title fix: replace Math.random with crypto #138 fix: replace Math.random with crypto https://github.com/moberwasserlechner/capacitor-oauth2/issues/138 Mar 23, 2021
@doatech doatech changed the title fix: replace Math.random with crypto https://github.com/moberwasserlechner/capacitor-oauth2/issues/138 fix: replace Math.random with crypto #138 Mar 23, 2021
@moberwasserlechner moberwasserlechner merged commit cdc0b7d into capacitor-community:master Jun 30, 2021
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

Successfully merging this pull request may close these issues.

2 participants