https://github.com/kyosu-1/passkey-go-example
Try passkey in go.
https://github.com/kyosu-1/passkey-go-example
go passkey webauthn
Last synced: 7 months ago
JSON representation
Try passkey in go.
- Host: GitHub
- URL: https://github.com/kyosu-1/passkey-go-example
- Owner: kyosu-1
- License: mit
- Created: 2024-04-18T22:25:11.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-19T03:51:39.000Z (about 2 years ago)
- Last Synced: 2024-04-28T04:54:35.094Z (about 2 years ago)
- Topics: go, passkey, webauthn
- Language: Go
- Homepage: https://passkey-example.trap.show/
- Size: 97.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# passkey-go-example
Go での Passkey Autofill を試すための実装
以下の二つのライブラリを利用
- https://github.com/go-webauthn/webauthn (client side)
- https://github.com/MasterKale/SimpleWebAuthn (server side)
## How to run
```bash
go run cmd/server/main.go
```
access to `http://localhost:8080/` and try to register and login.
## Endpoint
### 登録
パスキーの登録時には以下のエンドポイントを利用
- POST: /attestation/options
- POST: /attestation/result

(出典:[ウェブ認証 API – Web API | MDN](https://developer.mozilla.org/ja/docs/Web/API/Web_Authentication_API) )
### 認証
パスキーによる認証時には以下のエンドポイントを利用
- POST: /assertion/options
- POST: /assertion/result

(出典:[ウェブ認証 API – Web API | MDN](https://developer.mozilla.org/ja/docs/Web/API/Web_Authentication_API) )
## Reference
- https://www.w3.org/TR/webauthn-3/
- https://fidoalliance.org/specs/fido-v2.2-rd-20230321/fido-client-to-authenticator-protocol-v2.2-rd-20230321.html
- https://developer.mozilla.org/ja/docs/Web/API/Web_Authentication_API