rob 2 years ago
parent 1b255d53fb
commit c540c3cf95

@ -131,7 +131,9 @@ class OAuth2Service extends SiteService {
async processAuthorize (clientID, redirectUri, done) { async processAuthorize (clientID, redirectUri, done) {
try { try {
const client = await OAuth2Client.findOne({ clientID }); const client = await OAuth2Client
.findOne({ _id: mongoose.Types.ObjectId(clientID) })
.lean();
if (!client) { if (!client) {
this.log.alert('OAuth2 client not found', { clientID }); this.log.alert('OAuth2 client not found', { clientID });
return done(null, false); return done(null, false);

Loading…
Cancel
Save