This commit is contained in:
@@ -6,13 +6,17 @@ workspace:
|
||||
path: /drone/grow
|
||||
|
||||
steps:
|
||||
- name: Code Style
|
||||
- name: Install
|
||||
image: node:latest
|
||||
commands:
|
||||
- yarn install
|
||||
|
||||
- name: Check Code Style
|
||||
image: node:latest
|
||||
commands:
|
||||
- yarn prettier
|
||||
|
||||
- name: Code Lint
|
||||
- name: Lint Code
|
||||
image: node:latest
|
||||
commands:
|
||||
- yarn lint
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import passport from 'koa-passport';
|
||||
// eslint-disable-next-line import/named
|
||||
import { Strategy as LocalStrategy } from 'passport-local';
|
||||
|
||||
import Auth from '../model/auth';
|
||||
|
||||
export const localStrategy = passport.use(
|
||||
new LocalStrategy(async (username, password, done) => {
|
||||
new LocalStrategy(async (username: string, password: string, done: any) => {
|
||||
const user = await Auth.findOne({
|
||||
where: {
|
||||
username,
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"@types/passport-fido2-webauthn": "^0.1.0",
|
||||
"@types/passport-google-oauth": "^1.0.42",
|
||||
"@types/passport-jwt": "^3.0.8",
|
||||
"@types/passport-local": "^1.0.35",
|
||||
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
||||
"@typescript-eslint/parser": "^5.59.2",
|
||||
"eslint": "^8.39.0",
|
||||
|
||||
12
yarn.lock
12
yarn.lock
@@ -1794,6 +1794,7 @@ __metadata:
|
||||
"@types/passport-fido2-webauthn": ^0.1.0
|
||||
"@types/passport-google-oauth": ^1.0.42
|
||||
"@types/passport-jwt": ^3.0.8
|
||||
"@types/passport-local": ^1.0.35
|
||||
"@typescript-eslint/eslint-plugin": ^5.59.2
|
||||
"@typescript-eslint/parser": ^5.59.2
|
||||
dotenv: ^16.0.3
|
||||
@@ -2428,6 +2429,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/passport-local@npm:^1.0.35":
|
||||
version: 1.0.35
|
||||
resolution: "@types/passport-local@npm:1.0.35"
|
||||
dependencies:
|
||||
"@types/express": "*"
|
||||
"@types/passport": "*"
|
||||
"@types/passport-strategy": "*"
|
||||
checksum: b4ed4c40d2c7c42370c8a0ca7e18728bf3dbf2a56171d45c4f4d0281af9d91595ef9677a4f47ef10fdd5374a917b0ea64fb02d44ff4c424e48965e92915da294
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/passport-strategy@npm:*":
|
||||
version: 0.2.35
|
||||
resolution: "@types/passport-strategy@npm:0.2.35"
|
||||
|
||||
Reference in New Issue
Block a user