Rocket.Chat.ReactNative
Rocket.Chat.ReactNative copied to clipboard
Update userAgent.ts
Proposed changes
I'm trying to solve the problem of the userAgent being fixed and don't knowing the actual device.
Issue(s)
The userAgent of WebView being fixed and don't knowing the actual device.
How to test or reproduce
Screenshots
Types of changes
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] Improvement (non-breaking change which improves a current function)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Documentation update (if none of the other choices apply)
Checklist
- [ ] I have read the CONTRIBUTING doc
- [ ] I have signed the CLA
- [ ] Lint and unit tests pass locally with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works (if applicable)
- [ ] I have added necessary documentation (if applicable)
- [ ] Any dependent changes have been merged and published in downstream modules
Further comments
The userAgent of WebView being fixed and don't knowing the actual device.
That's intended. What issue you're trying to fix?
The userAgent of WebView being fixed and don't knowing the actual device.
That's intended. What issue you're trying to fix?
When using Google OAuth, the user will receive a security notification from Google. The notification notify the user have logged in A31. But the user don't own A31. The user will be confused when receive the notification.
@gimdongwoo Can you open an issue with more information, so we can track? Google OAuth should open on external browser and it shouldn't really use this user agent https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/b217435ffeba8cca132b85557b9e6db109b9422f/app/containers/LoginServices/serviceLogin.ts#L55
Google OAuth should open on external browser and it shouldn't really use this user agent
I am using iframe OAuth in RocketChat.
The iframe forwarded login page provides various login methods, including Google OAuth.
Because of this case, I experienced the security problem due to the wrong userAgent of AuthenticationWebView.tsx
.
I know I should have opened an issue first. But it was such a simple fix, I sent a PR first. I apologize for this. I will open an issue.