Skip to content

Commit

Permalink
Configure backend project and add authentication with passport lib
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgehl3n committed Aug 1, 2023
0 parents commit 6219647
Show file tree
Hide file tree
Showing 18 changed files with 3,475 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
node_modules
.env
16 changes: 16 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import User from "./src/database/models/User";
import session from 'express-session';

declare module 'express-session' {
export interface SessionData {
passport: {
user: string,
}
}
}

interface AuthenticatedRequest extends Request {
user?: User;
isAuthenticated: () => boolean;
role: string;
}
Loading

0 comments on commit 6219647

Please sign in to comment.