Adds Passwordless Authentication support to the Vapor web framework.
import Vapor
import Passwordless
let drop = Droplet()
try drop.addProvider(Passwordless.Provider.self)
To build, create a passwordless.json
file in the Config/secrets
folder.
You may need to create the secrets
folder if it does not exist. The secrets
folder is under the gitignore and shouldn't be committed.
Here's an example Config/secrets/passwordless.json
{
"subject": "email",
"same-device": true,
"token-medium": "body",
"signer": "hmac256",
"key": "passwordpasswordpasswordpassword",
"token-expiration": 604800,
"temp-token-expiration": 900,
"token-key": "access_token"
}