-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
MM-54558 SSO code challenge verification #7587
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
app/utils/strings.ts
Outdated
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; | ||
const charsLenght = chars.length; | ||
while (counter < length) { | ||
result += chars.charAt(Math.floor(Math.random() * charsLenght)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to use a CSPRNG. Math.random
is notoriously predictable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you double check this lib? https://www.npmjs.com/package/react-native-securerandom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable
Closing as won't accept |
Summary
Adds code challenge verification for SSO logins using the web browser.
Applies to OAuth, OpenID and SAML
Ticket Link
https://mattermost.atlassian.net/browse/MM-54558
Server PR: mattermost/mattermost#24734
Release Note