mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 10:19:10 +00:00
add AuthService as a DM authentication handler. (NEEDS SECURITY PASS)
This commit is contained in:
parent
02a66ee7b0
commit
f30ca78e40
6 changed files with 154 additions and 4 deletions
14
models/AuthChallenge.js
Normal file
14
models/AuthChallenge.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
// @flow
|
||||
import type Sequelize, { DataTypes as DT } from 'sequelize'
|
||||
|
||||
export default (sql: Sequelize, DataTypes: DT) => {
|
||||
return sql.define('auth_challenge', {
|
||||
userId: DataTypes.TEXT,
|
||||
issuedAt: DataTypes.DATE,
|
||||
type: DataTypes.ENUM('dm', 'other'),
|
||||
human: { type: DataTypes.TEXT, unique: true },
|
||||
magic: { type: DataTypes.TEXT, unique: true }
|
||||
}, {
|
||||
indexes: [ { fields: ['userId'] } ]
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue