Home / Companies / Vonage / Blog / Post Details
Content Deep Dive

Add 2FA to Your Nuxt Application with Nexmo Verify

Blog post from Vonage

Post Details
Company
Date Published
Author
Martyn Davies
Word Count
3,017
Language
English
Hacker News Points
-
Summary

This tutorial provides a comprehensive guide to building a basic application with two-factor authentication using the Nuxt JS framework. The application requires users to verify themselves by entering a PIN code sent to them via SMS, and it uses the Nexmo Verify API for this purpose. To achieve this, the tutorial demonstrates how to create a mini verification API using Express middleware inside Nuxt, which exposes three endpoints: `/send`, `/verify`, and `/auth-check`. These endpoints handle user input, verify phone numbers, and check authentication status, respectively. The application also includes server-side rendering, custom server middleware, and VueX state management. The tutorial concludes by highlighting the benefits of using Nuxt's Server Side Middleware for building complex applications with minimal overhead.