Skip to content

Vonage-Community/sample-verify2_sms_silent_auth-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Vonage logo

X

Laravel Logo

Laravel Silent Authentication Application

Requirements:

  • PHP 8.2+
  • Docker (via. Laravel Sail)
  • Yarn
  • Composer

Installation

  1. Install PHP dependencies in the terminal with composer install
  2. Create a new .env file by copying the example across in the terminal cp .env.example .env
  3. Boot up Sail in the terminal with ./vendor/bin/sail up -d
  4. Run migrations in the terminal with ./vendor/bin/sail artisan migrate and create the sqlite db
  5. Run the database seeder in the terminal with ./vendor/bin/sail artisan db:seed
  6. Install JavaScript dependencies with ./vendor/bin/sail yarn install
  7. Run frontend server with ./vendor/bin/sail yarn run dev
  8. Create an application key with ./vendor/bin/sail artisan key:generate
  9. Create a new application instance in the Vonage API Dashboard
  10. Download your private key for your new application ID and place it in the root directory of this project.
  11. Add your application ID to the VONAGE_APPLICATION_ID environment variable
  12. Change your VONAGE_PRIVATE_KEY_PATH variable to read like this: VONAGE_PRIVATE_KEY_PATH="./private.key"

Usage

You now have a SuperUser role that can log in with the email test@test.com and the password password.

To create new users, you can register them through an unguarded route (localhost/register). New users will be assigned the user role and can then use the phone number they have entered as their Silent Authentication with SMS one-time password (OTP) as a fallback.

Coverage

Silent Authentication works within a set list of territories and providers. Please see this page for a complete list.

About

Laravel Web Silent Authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published