Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/desmondsanctity/twilio-authy
A Next.js application that uses Twilio Authy for 2FA
https://github.com/desmondsanctity/twilio-authy
2fa mfa nextjs security twilio twilio-verify
Last synced: about 2 months ago
JSON representation
A Next.js application that uses Twilio Authy for 2FA
- Host: GitHub
- URL: https://github.com/desmondsanctity/twilio-authy
- Owner: DesmondSanctity
- License: mit
- Created: 2023-10-23T11:58:21.000Z (about 1 year ago)
- Default Branch: twilio-authy-starter
- Last Pushed: 2024-05-10T02:13:56.000Z (8 months ago)
- Last Synced: 2024-05-30T02:17:59.467Z (7 months ago)
- Topics: 2fa, mfa, nextjs, security, twilio, twilio-verify
- Language: JavaScript
- Homepage: https://twilio-authy.vercel.app
- Size: 237 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# twilio-authy
A Next.js application that uses Twilio Authy for 2FA
- To run the application, clone the `twilio-authy-starter` branch of this repository in a directory of your choice using the command below:
```bash
git clone https://github.com/DesmondSanctity/twilio-authy.git
```
- After cloning, run npm install to install all the dependencies needed
```bash
npm install
```
- Some environment variables are needed for the project to run, create a `.env` file in the root directory of your project. Fill it with these details
```js
MONGODB_URI=
JWT_SECRET=
accountSid=
authToken=
serviceSid=
```
- Finally run the dev command to start the application using this command```bash
npm run dev
```- For deploying to production, after the deployment, update the next.config file with your production URL. If not, you might have issues running the app on production environment.
```js
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
serverRuntimeConfig: {},
publicRuntimeConfig: {
apiUrl:
process.env.NODE_ENV === 'development'
? 'http://localhost:3000/api' // development api
: '/api', // production api
},
};module.exports = nextConfig;
```Credits for this boilerplate go to [Jason Watmore](https://github.com/cornflourblue/next-js-13-mongodb-registration-login-example)