mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-03 17:44:44 +02:00
added two factor to login endpoint
This commit is contained in:
parent
d7e090e5b7
commit
d1e198fe55
5 changed files with 308 additions and 6 deletions
|
@ -10,6 +10,8 @@ export const lucia = new Lucia(adapter, {
|
|||
getUserAttributes: (attributes) => {
|
||||
return {
|
||||
email: attributes.email,
|
||||
twoFactorEnabled: attributes.twoFactorEnabled,
|
||||
twoFactorSecret: attributes.twoFactorSecret,
|
||||
};
|
||||
},
|
||||
// getSessionAttributes: (attributes) => {
|
||||
|
@ -42,6 +44,8 @@ declare module "lucia" {
|
|||
interface DatabaseUserAttributes {
|
||||
email: string;
|
||||
passwordHash: string;
|
||||
twoFactorEnabled: boolean;
|
||||
twoFactorSecret: string | null;
|
||||
}
|
||||
|
||||
interface DatabaseSessionAttributes {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue