我正在为我的博客和工作网站使用 cloud run,我真的很喜欢它。我已经根据 google 教程通过容器化部署了 python API 和 Vue/Nuxt 应用程序。我不明白的一件事是为什么前面不需要 NGINX。
# Use the official lightweight Node.js 12 image.
# https://hub.docker.com/_/node
FROM node:12-slim
# Create and change to the app directory.
WORKDIR /usr/src/app
# Copy application dependency manifests to the container image.
# A wildcard is used to ensure both package.json AND package-lock.json are copied.
# Copying this separately prevents re-running npm install on every code change.
COPY package*.json ./
# Install production dependencies.
RUN npm install --only=production
# Copy …我正在努力让 Firebase Cloud Messaging sdk 与 Nuxt JS 一起使用
我不断收到“检索令牌时发生错误。FirebaseError:消息传递:用户订阅 FCM 时发生问题:请求缺少所需的身份验证凭据。需要 OAuth 2 访问令牌、登录 cookie 或其他有效的身份验证凭据。”
这是我在 fcm.js 中的代码,我在 nuxt.config.js 中作为插件运行
import firebase from "../firebase/init";
firebase
  .messaging()
  .usePublicVapidKey(
    "BDYE2EYHdIp8qHjTKcJYPvO4PgaAH2pSruP55FOtNs5jWsgdeg7YK6OgJ0daSu21kN7aSzU19NRXRqC4bfITZYQ "
  );
firebase
  .messaging()
  .getToken()
  .then((currentToken) => {
    console.log(currentToken);
    if (currentToken) {
      sendTokenToServer(currentToken);
      updateUIForPushEnabled(currentToken);
    } else {
      // Show permission request.
      console.log(
        "No Instance ID token available. Request permission to generate one."
      );
      // Show permission UI.
      updateUIForPushPermissionRequired();
      setTokenSentToServer(false);
    }
  })
  .catch((err) => {
    console.log("An error occurred while retrieving token. …我试图了解以下之间的区别:Cloud Identity、Firebase Auth、Identity Platform
我已阅读以下文件:https : //cloud.google.com/identity-platform/docs/product-comparison https://cloud.google.com/blog/products/identity-security/identity-and-authentication -the-google-cloud-way
我的问题是:
如果您需要了解我的用例,我基本上是在构建一个模块化企业应用程序,供我公司用于我们的建筑项目。
谢谢大家!
firebase google-cloud-platform firebase-authentication google-cloud-identity