MasterKale / SimpleWebAuthn

WebAuthn, Simplified. A collection of TypeScript-first libraries for simpler WebAuthn integration. Supports modern browsers, Node, Deno, and more.
https://simplewebauthn.dev
MIT License
1.62k stars 137 forks source link

WebKit support #283

Closed Nwgazzazamwal closed 2 years ago

Nwgazzazamwal commented 2 years ago

hello, any idea if this is supported inside a webview react native

MasterKale commented 2 years ago

I haven't done any native iOS dev myself, but my current understanding is that you want to use SFSafariViewController or ASWebAuthenticationSession if you want to use passkeys in your native app.

The best advice I have for figuring out how to incorporate these into a React Native project, unfortunately, is to google "react native SFSafariViewController" or "react native ASWebAuthenticationSession". Good luck!

I think at a high level there's nothing preventing you from using @simplewebauthn/browser in your React Native project. Your biggest hurdle is to figure out how to get a webview that'll support WebAuthn so that the browser library can do its thing. That's what SFSafariViewController should get you.

If you're trying to handle WebAuthn-based auth entirely in native code, though, and are aiming to get a server set up to handle responses then you can use @simplewebauthn/server to parse ASWebAuthenticationSession responses no problem.

MasterKale commented 2 years ago

I'm going to turn this into a Discussion for now as it's not reporting an issue with SimpleWebAuthn.