rob 2 years ago
parent 1b255d53fb
commit c540c3cf95

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

Loading…
Cancel
Save