Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gielcobben/next-auth-sequelize
Next Auth with Sequelize
https://github.com/gielcobben/next-auth-sequelize
Last synced: 29 days ago
JSON representation
Next Auth with Sequelize
- Host: GitHub
- URL: https://github.com/gielcobben/next-auth-sequelize
- Owner: gielcobben
- Created: 2018-02-06T10:50:02.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-07T14:59:08.000Z (almost 7 years ago)
- Last Synced: 2024-04-13T16:05:30.843Z (7 months ago)
- Language: JavaScript
- Size: 68.4 KB
- Stars: 12
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NextAuth Example
## About NextAuth Example
This is an example of how to use the [NextAuth](https://www.npmjs.com/package/next-auth) module with [Sequelizejs](http://docs.sequelizejs.com/).
## Getting Started
This project as is run the same way as any Next.js project.
To run it locally, just use:
nmp run dev
To run it it production mode, use:
npm build
npm start## Using NextAuth
NextAuth is included in this project here:
* index.js
## Pages
This example includes the following pages:
* pages/index.js
* pages/auth/index.js
* pages/auth/error.js
* pages/auth/check-email.js
* pages/auth/callback.js## Configuration
It also includes the following configuration files:
* next-auth.config.js
* next-auth.functions.js
* next-auth.providers.jsAn example **.env** file is provided in **.env.example** which you can copy over to use for simple configuration:
```
SERVER_URL=http://localhost:3000
DB_HOST=
DB_PORT=
DB_USER=
DB_PASS=
DB_NAME=
FACEBOOK_ID=
FACEBOOK_SECRET=
GOOGLE_ID=
GOOGLE_SECRET=
TWITTER_KEY=
TWITTER_SECRET=
[email protected]
EMAIL_SERVER=smtp.gmail.com
EMAIL_PORT=465
[email protected]
EMAIL_PASSWORD=
```If you don't specify oAuth or SMTP email details you will not be able to log in.