@base44-preview/cli 0.0.50-pr.445.16001ec → 0.0.50-pr.445.28459a0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +10 -11
- package/dist/cli/index.js.map +5 -5
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -241789,15 +241789,16 @@ function hasAnyLoginMethod(config3) {
|
|
|
241789
241789
|
var SOCIAL_PROVIDERS = {
|
|
241790
241790
|
google: {
|
|
241791
241791
|
field: "enableGoogleLogin",
|
|
241792
|
+
label: "Google",
|
|
241792
241793
|
customOAuth: {
|
|
241793
241794
|
modeField: "googleOAuthMode",
|
|
241794
241795
|
clientIdField: "googleOAuthClientId",
|
|
241795
241796
|
secretKey: "google_oauth_client_secret"
|
|
241796
241797
|
}
|
|
241797
241798
|
},
|
|
241798
|
-
microsoft: { field: "enableMicrosoftLogin" },
|
|
241799
|
-
facebook: { field: "enableFacebookLogin" },
|
|
241800
|
-
apple: { field: "enableAppleLogin" }
|
|
241799
|
+
microsoft: { field: "enableMicrosoftLogin", label: "Microsoft" },
|
|
241800
|
+
facebook: { field: "enableFacebookLogin", label: "Facebook" },
|
|
241801
|
+
apple: { field: "enableAppleLogin", label: "Apple" }
|
|
241801
241802
|
};
|
|
241802
241803
|
function toAuthConfigPayload(config3) {
|
|
241803
241804
|
return {
|
|
@@ -250897,12 +250898,6 @@ function getAuthPushCommand() {
|
|
|
250897
250898
|
|
|
250898
250899
|
// src/cli/commands/auth/social-login.ts
|
|
250899
250900
|
import { dirname as dirname10, join as join15, resolve as resolve2 } from "node:path";
|
|
250900
|
-
var PROVIDER_LABELS = {
|
|
250901
|
-
google: "Google",
|
|
250902
|
-
microsoft: "Microsoft",
|
|
250903
|
-
facebook: "Facebook",
|
|
250904
|
-
apple: "Apple"
|
|
250905
|
-
};
|
|
250906
250901
|
var VALID_PROVIDER_NAMES = Object.keys(SOCIAL_PROVIDERS);
|
|
250907
250902
|
var PROVIDER_OAUTH_CLI = {
|
|
250908
250903
|
google: {
|
|
@@ -250919,7 +250914,7 @@ function hasCustomOAuthOptions(options) {
|
|
|
250919
250914
|
async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, provider, action, options) {
|
|
250920
250915
|
const shouldEnable = action === "enable";
|
|
250921
250916
|
const providerInfo = SOCIAL_PROVIDERS[provider];
|
|
250922
|
-
const label =
|
|
250917
|
+
const label = providerInfo.label;
|
|
250923
250918
|
const hasOAuthOptions = hasCustomOAuthOptions(options);
|
|
250924
250919
|
if (hasOAuthOptions && !providerInfo.customOAuth) {
|
|
250925
250920
|
throw new InvalidInputError(`Custom OAuth options are only supported for providers with custom OAuth (e.g., google). Use: base44 auth social-login ${provider} ${action}`);
|
|
@@ -253346,9 +253341,13 @@ function createFunctionRouter(manager, logger2) {
|
|
|
253346
253341
|
on: {
|
|
253347
253342
|
proxyReq: (proxyReq, req) => {
|
|
253348
253343
|
const xAppId = req.headers["x-app-id"];
|
|
253344
|
+
const authorization = req.headers.authorization;
|
|
253349
253345
|
if (xAppId) {
|
|
253350
253346
|
proxyReq.setHeader("Base44-App-Id", xAppId);
|
|
253351
253347
|
}
|
|
253348
|
+
if (authorization) {
|
|
253349
|
+
proxyReq.setHeader("Base44-Service-Authorization", authorization);
|
|
253350
|
+
}
|
|
253352
253351
|
proxyReq.setHeader("Base44-Api-Url", `${req.protocol}://${req.headers.host}`);
|
|
253353
253352
|
},
|
|
253354
253353
|
error: (err, _req, res) => {
|
|
@@ -260419,4 +260418,4 @@ export {
|
|
|
260419
260418
|
CLIExitError
|
|
260420
260419
|
};
|
|
260421
260420
|
|
|
260422
|
-
//# debugId=
|
|
260421
|
+
//# debugId=A5870B4B3C54D78864756E2164756E21
|