• Stars
    star
    127
  • Rank 282,790 (Top 6 %)
  • Language
    Swift
  • License
    Apache License 2.0
  • Created over 2 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Swift library for implementing the WebAuthn spec

webauthn-swift

This package provides a Swift implementation of the WebAuthn API focused on making it easy to leverage the power of WebAuthn.

Getting Started

Adding the dependency

Add the following entry in your Package.swift to start using WebAuthn:

.package(url: "https://github.com/swift-server/webauthn-swift.git", from: "1.0.0-alpha")

and WebAuthn dependency to your target:

.target(name: "MyApp", dependencies: [.product(name: "WebAuthn", package: "webauthn-swift")])

Setup

Configure your Relying Party with a WebAuthnManager instance:

let webAuthnManager = WebAuthnManager(
    configuration: WebAuthnManager.Configuration(
        relyingPartyID: "example.com",
        relyingPartyName: "My Fancy Web App",
        relyingPartyOrigin: "https://example.com"
    )
)

Registration

For a registration ceremony use the following two methods:

  • WebAuthnManager.beginRegistration()
  • WebAuthnManager.finishRegistration()

Authentication

For an authentication ceremony use the following two methods:

  • WebAuthnManager.beginAuthentication()
  • WebAuthnManager.finishAuthentication()

Credits

Swift WebAuthn is heavily inspired by existing WebAuthn libraries like py_webauthn and go-webauthn.

Links

More Repositories

1

swift-aws-lambda-runtime

Swift implementation of AWS Lambda Runtime
Swift
1,132
star
2

async-http-client

HTTP client library built on SwiftNIO
Swift
917
star
3

http

⚠️ Historical HTTP API - please use https://github.com/swift-server/async-http-client instead
Swift
703
star
4

vscode-swift

Visual Studio Code Extension for Swift
TypeScript
622
star
5

swift-service-lifecycle

Cleanly startup and shutdown server application, freeing resources in order before exiting.
Swift
395
star
6

work-group

⚠️ Historical workgroup organisation
352
star
7

swiftly

A Swift toolchain installer and manager, written in Swift.
Swift
337
star
8

swift-backtrace

πŸ’₯ Backtraces for Swift on Linux and Windows
C
295
star
9

guides

Guides for building, debugging and deploying Swift Server applications
258
star
10

sswg

Swift Server Working Group (SSWG)
181
star
11

swift-prometheus

Prometheus client library for Swift
Swift
144
star
12

RediStack

Non-blocking, event-driven Swift client for Redis.
Swift
142
star
13

swift-openapi-vapor

Vapor Bindings for the OpenAPI Generator
Swift
79
star
14

swift-kafka-client

Swift
77
star
15

swift-devcontainer-template

Visual Studio Code Development Container for Swift
Shell
54
star
16

swift-openapi-async-http-client

AsyncHTTPClient transport for Swift OpenAPI Generator.
Swift
54
star
17

security

⚠️ Historical TLS API - please use SwiftNIO instead
Swift
49
star
18

swift-aws-lambda-events

Swift implementation of AWS Lambda Events
Swift
48
star
19

swift-openapi-hummingbird

Hummingbird transport for OpenAPI generator
Shell
27
star
20

swift-memcache-gsoc

Swift
15
star
21

sswg-collection

Dockerfile
11
star
22

swift-openapi-lambda

An AWS Lambda transport for Swift OpenAPI
Swift
8
star
23

swift-service-cache

caches for swift services
6
star
24

swift-etcd-client-gsoc

Swift
5
star