1
0
Fork 0
mirror of synced 2024-09-30 00:57:16 +13:00
This commit is contained in:
Martin McKeaveney 2021-04-22 11:48:37 +01:00
parent 6462848191
commit f7085a57c7
2 changed files with 11 additions and 3 deletions

View file

@ -1,4 +1,8 @@
const { generateTemplateID, getTemplateParams, StaticDatabases } = require("@budibase/auth").db
const {
generateTemplateID,
getTemplateParams,
StaticDatabases,
} = require("@budibase/auth").db
const { CouchDB } = require("../../../db")
const { TemplatePurposePretty } = require("../../../constants")
@ -42,7 +46,7 @@ exports.save = async ctx => {
exports.definitions = async ctx => {
ctx.body = {
purpose: TemplatePurposePretty
purpose: TemplatePurposePretty,
}
}

View file

@ -53,7 +53,11 @@ exports.googlePreAuth = async (ctx, next) => {
}
exports.googleAuth = async (ctx, next) => {
const strategy = await google.strategyFactory(ctx)
const strategy = await google.strategyFactory({
type: Configs.GOOGLE,
user: ctx.user._id,
group: ctx.query.group,
})
return passport.authenticate(
strategy,