diff --git a/app/models/oauth2-authorization-code.js b/app/models/oauth2-authorization-code.js index 40708a3..2017ea7 100644 --- a/app/models/oauth2-authorization-code.js +++ b/app/models/oauth2-authorization-code.js @@ -10,9 +10,9 @@ const Schema = mongoose.Schema; const OAuth2AuthorizationCodeSchema = new Schema({ code: { type: String, required: true, index: 1 }, - clientId: { type: Schema.ObjectId, required: true, index: 1 }, + client: { type: Schema.ObjectId, required: true, index: 1, ref: 'OAuth2Client' }, redirectUri: { type: String, required: true }, - user: { type: Schema.ObjectId, required: true, index: 1 }, + user: { type: Schema.ObjectId, required: true, index: 1, ref: 'User' }, scopes: { type: [String], required: true }, });