How to move from login_start/{username} to login_finish OUTSIDE of the example registration flow #413
-
Sirs, When invoking "login_start/{username}" it returns a RequestChallengeResponse (rcr). But the "login_finish" endpoint requires a Jsonified PublicKeyCredential parameter and I don't see how to map from the RequestChallengeResponse to the PublicKeyCredential. Is there a function I need to invoke in-between? I'm assuming that after invoking the "login_start" method I should immediately turn around and call the "login_finish". Ideally the "login_start" would just push its result into the session from which the "login_finish" would just pick up and I wouldn't have to pass ANYTHING to the "login_finish" endpoint, but that is not the case. Can someone please nudge me in the right direction? I had a discussion here a day or so ago that had related comments but that seems to have disappeared... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Read: https://github.com/kanidm/webauthn-rs/blob/master/tutorial/server/tide/src/main.rs#L209 And https://github.com/kanidm/webauthn-rs/blob/master/tutorial/wasm/src/lib.rs#L220 The two work together. Where the front end triggers the call to get the challenge, the front end then uses navigator.credentials.get ( https://github.com/kanidm/webauthn-rs/blob/master/tutorial/wasm/src/lib.rs#L281 ) which creates the PublicKeyCredential, and then that's posted back to the server. There is also a JS version: https://github.com/kanidm/webauthn-rs/blob/master/tutorial/server/axum/assets/js/auth.js |
Beta Was this translation helpful? Give feedback.
Read: https://github.com/kanidm/webauthn-rs/blob/master/tutorial/server/tide/src/main.rs#L209
And https://github.com/kanidm/webauthn-rs/blob/master/tutorial/wasm/src/lib.rs#L220
The two work together. Where the front end triggers the call to get the challenge, the front end then uses navigator.credentials.get ( https://github.com/kanidm/webauthn-rs/blob/master/tutorial/wasm/src/lib.rs#L281 ) which creates the PublicKeyCredential, and then that's posted back to the server.
There is also a JS version:
https://github.com/kanidm/webauthn-rs/blob/master/tutorial/server/axum/assets/js/auth.js