lbuchs / WebAuthn

A simple PHP WebAuthn (FIDO2/Passkey) server library

Home Page:https://webauthn.lubu.ch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example of Login Page

Cyberscitymaste opened this issue · comments

Hallo iam Trying to implementat the Script
need a Login Page with Mysql Database example Please

and a Register Page Please.

Ist all there, but you need to make it pretty thouh
https://github.com/lbuchs/WebAuthn/tree/master/_test

This one helped me a lot: https://dev.to/codeboxx/simple-php-webauthn-2h2b
You have to save at least credentialId and credentialPublicKey in your database connected to the User-ID.

Some basic instructions on implementation would have been great. Its not as simple as the author keeps writing everywhere lol.

@Whip what do you need - don't understand?
its a two step process, one is registering your webauthn device, one is authentication.

for registering you create the chanllenge for a given username, and use javascript to let that challenge be processed by the client,
and storing the results on your server

for login its creating a challenge agein, and presenting the public keys of all accepted devices to the javascript again, so that it can interact with the browser.

okay, it might not be as easy to understand, because this example uses only get parameters instead of http post request - but the principe is the same

I'll be able to work it out but that's by understanding the example given in the _test. I don't think an average programmer can do this.

I'll try to create a PR for simplified instructions once I do it myself.