Merge branch 'develop' of github.com:Budibase/budibase into develop
This commit is contained in:
commit
2fc283ad06
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "0.9.98",
|
||||
"version": "0.9.99-alpha.2",
|
||||
"npmClient": "yarn",
|
||||
"packages": [
|
||||
"packages/*"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/auth",
|
||||
"version": "0.9.98",
|
||||
"version": "0.9.99-alpha.2",
|
||||
"description": "Authentication middlewares for budibase builder and apps",
|
||||
"main": "src/index.js",
|
||||
"author": "Budibase",
|
||||
|
@ -13,6 +13,7 @@
|
|||
"@techpass/passport-openidconnect": "^0.3.0",
|
||||
"aws-sdk": "^2.901.0",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"cls-hooked": "^4.2.2",
|
||||
"ioredis": "^4.27.1",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"koa-passport": "^4.1.4",
|
||||
|
@ -25,8 +26,7 @@
|
|||
"sanitize-s3-objectkey": "^0.0.1",
|
||||
"tar-fs": "^2.1.1",
|
||||
"uuid": "^8.3.2",
|
||||
"zlib": "^1.0.5",
|
||||
"cls-hooked": "^4.2.2"
|
||||
"zlib": "^1.0.5"
|
||||
},
|
||||
"jest": {
|
||||
"setupFiles": [
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/bbui",
|
||||
"description": "A UI solution used in the different Budibase projects.",
|
||||
"version": "0.9.98",
|
||||
"version": "0.9.99-alpha.2",
|
||||
"license": "AGPL-3.0",
|
||||
"svelte": "src/index.js",
|
||||
"module": "dist/bbui.es.js",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/builder",
|
||||
"version": "0.9.98",
|
||||
"version": "0.9.99-alpha.2",
|
||||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -65,10 +65,10 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "^0.9.98",
|
||||
"@budibase/client": "^0.9.98",
|
||||
"@budibase/bbui": "^0.9.99-alpha.2",
|
||||
"@budibase/client": "^0.9.99-alpha.2",
|
||||
"@budibase/colorpicker": "1.1.2",
|
||||
"@budibase/string-templates": "^0.9.98",
|
||||
"@budibase/string-templates": "^0.9.99-alpha.2",
|
||||
"@sentry/browser": "5.19.1",
|
||||
"@spectrum-css/page": "^3.0.1",
|
||||
"@spectrum-css/vars": "^3.0.1",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { Label } from "@budibase/bbui"
|
||||
import { Label, Checkbox } from "@budibase/bbui"
|
||||
import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte"
|
||||
|
||||
export let parameters
|
||||
|
|
|
@ -187,7 +187,6 @@
|
|||
`Please fill in all required ${ConfigTypes.Google} fields`
|
||||
)
|
||||
} else {
|
||||
delete element.config.callbackURL
|
||||
calls.push(api.post(`/api/global/configs`, element))
|
||||
googleSaveButtonDisabled = true
|
||||
originalGoogleDoc = cloneDeep(providers.google)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/cli",
|
||||
"version": "0.9.98",
|
||||
"version": "0.9.99-alpha.2",
|
||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||
"main": "src/index.js",
|
||||
"bin": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/client",
|
||||
"version": "0.9.98",
|
||||
"version": "0.9.99-alpha.2",
|
||||
"license": "MPL-2.0",
|
||||
"module": "dist/budibase-client.js",
|
||||
"main": "dist/budibase-client.js",
|
||||
|
@ -18,9 +18,9 @@
|
|||
"dev:builder": "rollup -cw"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "^0.9.98",
|
||||
"@budibase/standard-components": "^0.9.98",
|
||||
"@budibase/string-templates": "^0.9.98",
|
||||
"@budibase/bbui": "^0.9.99-alpha.2",
|
||||
"@budibase/standard-components": "^0.9.99-alpha.2",
|
||||
"@budibase/string-templates": "^0.9.99-alpha.2",
|
||||
"regexparam": "^1.3.0",
|
||||
"shortid": "^2.2.15",
|
||||
"svelte-spa-router": "^3.0.5"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/server",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "0.9.98",
|
||||
"version": "0.9.99-alpha.2",
|
||||
"description": "Budibase Web Server",
|
||||
"main": "src/index.js",
|
||||
"repository": {
|
||||
|
@ -62,9 +62,9 @@
|
|||
"author": "Budibase",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@budibase/auth": "^0.9.98",
|
||||
"@budibase/client": "^0.9.98",
|
||||
"@budibase/string-templates": "^0.9.98",
|
||||
"@budibase/auth": "^0.9.99-alpha.2",
|
||||
"@budibase/client": "^0.9.99-alpha.2",
|
||||
"@budibase/string-templates": "^0.9.99-alpha.2",
|
||||
"@elastic/elasticsearch": "7.10.0",
|
||||
"@koa/router": "8.0.0",
|
||||
"@sendgrid/mail": "7.1.1",
|
||||
|
@ -117,7 +117,7 @@
|
|||
"devDependencies": {
|
||||
"@babel/core": "^7.14.3",
|
||||
"@babel/preset-env": "^7.14.4",
|
||||
"@budibase/standard-components": "^0.9.98",
|
||||
"@budibase/standard-components": "^0.9.99-alpha.2",
|
||||
"@jest/test-sequencer": "^24.8.0",
|
||||
"@types/bull": "^3.15.1",
|
||||
"@types/jest": "^26.0.23",
|
||||
|
|
|
@ -29,18 +29,17 @@
|
|||
"keywords": [
|
||||
"svelte"
|
||||
],
|
||||
"version": "0.9.98",
|
||||
"version": "0.9.99-alpha.2",
|
||||
"license": "MIT",
|
||||
"gitHead": "d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "^0.9.98",
|
||||
"@budibase/bbui": "^0.9.99-alpha.2",
|
||||
"@spectrum-css/card": "^3.0.3",
|
||||
"@spectrum-css/divider": "^1.0.3",
|
||||
"@spectrum-css/link": "^3.1.3",
|
||||
"@spectrum-css/page": "^3.0.1",
|
||||
"@spectrum-css/typography": "^3.0.2",
|
||||
"@spectrum-css/vars": "^3.0.1",
|
||||
"@spectrum-css/divider": "^1.0.3",
|
||||
"apexcharts": "^3.22.1",
|
||||
"dayjs": "^1.10.5",
|
||||
"svelte-apexcharts": "^1.0.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/string-templates",
|
||||
"version": "0.9.98",
|
||||
"version": "0.9.99-alpha.2",
|
||||
"description": "Handlebars wrapper for Budibase templating.",
|
||||
"main": "src/index.cjs",
|
||||
"module": "dist/bundle.mjs",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/worker",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "0.9.98",
|
||||
"version": "0.9.99-alpha.2",
|
||||
"description": "Budibase background service",
|
||||
"main": "src/index.js",
|
||||
"repository": {
|
||||
|
@ -23,8 +23,8 @@
|
|||
"author": "Budibase",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@budibase/auth": "^0.9.98",
|
||||
"@budibase/string-templates": "^0.9.98",
|
||||
"@budibase/auth": "^0.9.99-alpha.2",
|
||||
"@budibase/string-templates": "^0.9.99-alpha.2",
|
||||
"@koa/router": "^8.0.0",
|
||||
"@techpass/passport-openidconnect": "^0.3.0",
|
||||
"aws-sdk": "^2.811.0",
|
||||
|
|
|
@ -15,7 +15,11 @@ const {
|
|||
} = require("@budibase/auth/tenancy")
|
||||
const env = require("../../../environment")
|
||||
|
||||
function googleCallbackUrl() {
|
||||
function googleCallbackUrl(config) {
|
||||
// incase there is a callback URL from before
|
||||
if (config && config.callbackURL) {
|
||||
return config.callbackURL
|
||||
}
|
||||
let callbackUrl = `/api/global/auth`
|
||||
if (isMultiTenant()) {
|
||||
callbackUrl += `/${getTenantId()}`
|
||||
|
@ -116,12 +120,12 @@ exports.logout = async ctx => {
|
|||
*/
|
||||
exports.googlePreAuth = async (ctx, next) => {
|
||||
const db = getGlobalDB()
|
||||
let callbackUrl = googleCallbackUrl()
|
||||
|
||||
const config = await authPkg.db.getScopedConfig(db, {
|
||||
type: Configs.GOOGLE,
|
||||
workspace: ctx.query.workspace,
|
||||
})
|
||||
let callbackUrl = googleCallbackUrl(config)
|
||||
const strategy = await google.strategyFactory(config, callbackUrl)
|
||||
|
||||
return passport.authenticate(strategy, {
|
||||
|
@ -131,12 +135,12 @@ exports.googlePreAuth = async (ctx, next) => {
|
|||
|
||||
exports.googleAuth = async (ctx, next) => {
|
||||
const db = getGlobalDB()
|
||||
const callbackUrl = googleCallbackUrl()
|
||||
|
||||
const config = await authPkg.db.getScopedConfig(db, {
|
||||
type: Configs.GOOGLE,
|
||||
workspace: ctx.query.workspace,
|
||||
})
|
||||
const callbackUrl = googleCallbackUrl(config)
|
||||
const strategy = await google.strategyFactory(config, callbackUrl)
|
||||
|
||||
return passport.authenticate(
|
||||
|
|
|
@ -6,6 +6,15 @@ const { buildAuthMiddleware, auditLog, buildTenancyMiddleware } =
|
|||
require("@budibase/auth").auth
|
||||
|
||||
const PUBLIC_ENDPOINTS = [
|
||||
// old deprecated endpoints kept for backwards compat
|
||||
{
|
||||
route: "/api/admin/auth/google/callback",
|
||||
method: "GET",
|
||||
},
|
||||
{
|
||||
route: "/api/admin/auth/oidc/callback",
|
||||
method: "GET",
|
||||
},
|
||||
{
|
||||
// this covers all of the POST auth routes
|
||||
route: "/api/global/auth/:tenantId",
|
||||
|
|
Loading…
Reference in New Issue