Spaces:
Running
Running
Download models/OAuthCode.js from 4send/messenger: direct link, hf CLI and curl.
- Browser
- Download file 742 Bytes
-
https://huggingface.co/spaces/4send/messenger/resolve/main/models/OAuthCode.js
- Command line
-
hf download hf://spaces/4send/messenger/models/OAuthCode.js
-
curl -L -o OAuthCode.js https://huggingface.co/spaces/4send/messenger/resolve/main/models/OAuthCode.js
742 Bytes
| const mongoose = require('mongoose'); | |
| const OAuthCodeSchema = new mongoose.Schema({ | |
| codeHash: { type: String, required: true, unique: true, index: true }, | |
| clientId: { type: String, required: true, index: true }, | |
| redirectUri: { type: String, required: true }, | |
| scope: { type: String, default: 'profile' }, | |
| codeChallenge: { type: String, default: null }, | |
| codeChallengeMethod: { type: String, default: null }, | |
| username: { type: String, required: true, index: true }, | |
| usedAt: { type: Date, default: null }, | |
| expiresAt: { type: Date, required: true, expires: 0 }, | |
| createdAt: { type: Date, default: Date.now } | |
| }, { collection: 'oauth_codes' }); | |
| module.exports = mongoose.model('OAuthCode', OAuthCodeSchema); | |