Files
timmal/pb_migrations/1765135365_updated_users.js
Lucien Cartier-Tilet 1bdfbdb446
Some checks failed
ci / ci (22, ubuntu-latest) (push) Failing after 6m46s
feat: authentication with OAuth
2025-12-09 08:55:46 +01:00

37 lines
656 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId('_pb_users_auth_')
// update collection data
unmarshal({
oauth2: {
enabled: true
},
otp: {
enabled: true
},
passwordAuth: {
enabled: false
}
}, collection)
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId('_pb_users_auth_')
// update collection data
unmarshal({
oauth2: {
enabled: false
},
otp: {
enabled: false
},
passwordAuth: {
enabled: true
}
}, collection)
return app.save(collection)
})