|
|
|
@ -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);
|
|
|
|
|