mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #16527 from overleaf/jpa-wf-hint-oauth
[web] add endpoint for checking on prior usage of Writefull oauth GitOrigin-RevId: a8ecc06b7f045237773cdb5c073c2f7d7abd04f9
This commit is contained in:
parent
811172f1fa
commit
a68b0b2793
1 changed files with 25 additions and 0 deletions
25
services/web/migrations/20240115172206_oauth_issuer_index.js
Normal file
25
services/web/migrations/20240115172206_oauth_issuer_index.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
const Helpers = require('./lib/helpers')
|
||||
|
||||
exports.tags = ['saas']
|
||||
|
||||
const index = {
|
||||
key: {
|
||||
oauthApplication_id: 1,
|
||||
},
|
||||
name: 'oauthApplication_id_1',
|
||||
partialFilterExpression: {
|
||||
oauthApplication_id: {
|
||||
$exists: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
exports.migrate = async client => {
|
||||
const { db } = client
|
||||
await Helpers.addIndexesToCollection(db.oauthAccessTokens, [index])
|
||||
}
|
||||
|
||||
exports.rollback = async client => {
|
||||
const { db } = client
|
||||
await Helpers.dropIndexesFromCollection(db.oauthAccessTokens, [index])
|
||||
}
|
Loading…
Reference in a new issue