Browse Source

add model references

pull/1/head
Rob Colbert 3 years ago
parent
commit
6ef87bbeaa
  1. 4
      app/models/oauth2-authorization-code.js

4
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 },
});

Loading…
Cancel
Save