Git Product home page Git Product logo

vapor-passkeydemo's Introduction

Vapor Passkey Demo

Proof of concept app for trying to integrate passkeys and WebAuthn into Vapor

Screenshot of app

Usage

Clone the project, then in Terminal run

swift run

In your browser go to http://localhost:8080 and follow the steps!

Note: This is proof of concept code to scope out the work to build a Swift Server library for WebAuthn. I do not advise using it in production until it's had some eyes on it. Many things are unimplemented and untested so be warned! Only tested on macOS 12.4 with Safari 15.5

Development

If you want to make CSS changes you'll need to download the Tailwind CSS executable and place it in the root of the project:

# Example for macOS arm64
curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-macos-arm64
chmod +x tailwindcss-macos-arm64
mv tailwindcss-macos-arm64 tailwindcss

Then run the following to generate Tailwind CSS classes and watch for changes:

./tailwindcss -i Resources/Utils/styles.css -o Public/styles/tailwind.css --watch

Do not edit Public/styles/tailwind.css manually as it will be overwritten by the above command!

vapor-passkeydemo's People

Contributors

0xtim avatar jeroenleenarts avatar marius-se avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vapor-passkeydemo's Issues

InternalServerError - Making a credential

I suspect there is at least one environment variables that needs to be set before running this proof-of-concept.
I noticed the makeCredential route is looking for an ORIGIN variable, eg.
guard let origin = Environment.get("ORIGIN") else { throw Abort(.internalServerError) }
Any idea what I should set this to?

Missing prerequisites: Postgres config

Tim, this looks like a very interesting project. But the README omits information vital to get started with it. I'm new to postgreSQL and installed it via brew. After trying MANY things I figured out I could get your server to run by starting it like this

sql -c "CREATE DATABASE vapor_database"
DATABASE_USER=$USER swift run

Would you be so kind as to amend the README for us novices?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.