Sign inSign up

signalwire/snippets-text-two-factor-auth

By signalwire

•Updated over 6 years ago

This snippet will show you how to implement basic two factor authentication via an text message.

Image
0

87

signalwire/snippets-text-two-factor-auth repository overview

⁠Setup Your Enviroment File

  1. Copy from example.env and fill in your values
  2. Save new file callled .env

Your file should look something like this

## This is the full name of your SignalWire Space. e.g.: example.signalwire.com
SIGNALWIRE_SPACE=
# Your Project ID - you can find it on the `API` page in your Dashboard.
SIGNALWIRE_PROJECT=
# Your API token - you can generate one on the `API` page in your Dashboard
SIGNALWIRE_TOKEN=
# The phone number you'll be using for this Snippets. Must include the `+1` , e$
SIGNALWIRE_NUMBER=

⁠Build and Run on Docker

Lets get started!

  1. Use our pre-built image from Docker Hub
For Python:
docker pull signalwire/snippets-text-two-factor-auth:python

(or build your own image)

  1. Build your image
docker build -t snippets-text-two-factor-auth .
  1. Run your image
docker run --publish 5000:5000 --env-file .env snippets-text-two-factor-auth
  1. The application will run on port 5000

Tag summary

Content type

Image

Digest

Size

344.1 MB

Last updated

over 6 years ago

docker pull signalwire/snippets-text-two-factor-auth:python