mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
added protocol check
This commit is contained in:
3
index.js
3
index.js
@@ -263,7 +263,8 @@ module.exports = (nextApp, {
|
||||
}
|
||||
|
||||
const token = uuid()
|
||||
const url = (serverUrl || `http://${req.headers.host}`) + `${pathPrefix}/email/signin/${token}`
|
||||
const http = req.secure ? 'https' : 'http'
|
||||
const url = (serverUrl || `${http}://${req.headers.host}`) + `${pathPrefix}/email/signin/${token}`
|
||||
|
||||
// Create verification token save it to database
|
||||
functions.find({ email: email })
|
||||
|
||||
Reference in New Issue
Block a user