Files
overleaf-cep/services/web/app/src/models/OauthAuthorizationCode.mjs
T
Andrew Rumble 07c827e9fd Merge pull request #29928 from overleaf/ar-last-infrastructure-conversions
[web] last infrastructure conversions

GitOrigin-RevId: ad1aff9b7df0610ed0303157d9e2c8032f32c02b
2025-11-28 09:05:56 +00:00

27 lines
639 B
JavaScript

import mongoose from '../infrastructure/Mongoose.mjs'
const { Schema } = mongoose
const { ObjectId } = Schema
export const OauthAuthorizationCodeSchema = new Schema(
{
authorizationCode: String,
expiresAt: Date,
oauthApplication_id: { type: ObjectId, ref: 'OauthApplication' },
redirectUri: String,
scope: String,
user_id: { type: ObjectId, ref: 'User' },
codeChallenge: String,
codeChallengeMethod: String,
},
{
collection: 'oauthAuthorizationCodes',
minimize: false,
}
)
export const OauthAuthorizationCode = mongoose.model(
'OauthAuthorizationCode',
OauthAuthorizationCodeSchema
)