-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[wkwebview] create api to allow clients to present a client credential for authentication #141
Conversation
…esent a credential. Expose a setter that can be called to set a credential.
Thanks for the PR @mjhu !
|
FYI: facebook/react-native@8911353 This has been merged into the core. But i'd still like that we wait for the answers to above questions :) |
Thanks for the comments @jamonholmgren and @Titozzz!
|
…esent a credential. Expose a setter that can be called to set a credential.
@jamonholmgren and @Titozzz sorry for the delay! I updated the docs for usage of the new setter. |
If you open webpages that needs a Client Certificate for Authentication, you can create a credential and pass it to the webview: | ||
|
||
``` | ||
[RNCWKWebView setClientAuthenticationCredential:credential]; |
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.
@mjhu Can you explain where you would put this code, normally? Would it be in the AppDelegate.m
file?
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.
It doesn't have to be in AppDelegate.m. For our use case, we have this call inside our auth initiation stack that runs as part of app start. The only requirement is that call is made before using any webviews. I'll update the comment with this.
@jamonholmgren Regarding testing, this was done on an internal app and I verified the webview presents the client cert correctly and is able to access the test site. |
As this landed on the core webview, I'll merge it here too. |
# [5.1.0](v5.0.8...v5.1.0) (2019-02-12) ### Features * **wkwebview:** create api to allow clients to present a client credential for authentication ([#141](#141)) ([fc5fd24](fc5fd24))
🎉 This PR is included in version 5.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…ential for authentication (react-native-webview#141) * In order for TLS Mutual Auth to work for webviews, the caller must present a credential. Expose a setter that can be called to set a credential.
# [5.1.0](react-native-webview/react-native-webview@v5.0.8...v5.1.0) (2019-02-12) ### Features * **wkwebview:** create api to allow clients to present a client credential for authentication ([react-native-webview#141](react-native-webview#141)) ([fc5fd24](react-native-webview@fc5fd24))
@mjhu do you have some code examples by any chance how you use it? 😊 |
# [5.1.0](react-native-webview/react-native-webview@v5.0.8...v5.1.0) (2019-02-12) ### Features * **wkwebview:** create api to allow clients to present a client credential for authentication ([#141](react-native-webview/react-native-webview#141)) ([fc5fd24](react-native-webview/react-native-webview@fc5fd24))
In order for TLS Mutual Auth to work for webviews, the caller must present a credential. Expose a setter that can be called to set a credential.