【问题标题】:Google Firebase SAML Auth: Getting 400 Error INVALID_IDP_RESPONSE: has no assertionsGoogle Firebase SAML 身份验证:出现 400 错误 INVALID_IDP_RESPONSE:没有断言
【发布时间】:2021-08-05 03:19:51
【问题描述】:

我正在尝试将我的 Firebase 应用程序与作为身份提供者的斯坦福大学的 SUNet 连接起来。通过弹出窗口成功登录后,我收到 400 响应。相关代码粘贴在下面。有人见过这个吗?

  const samlLogin = (samlProvider) => () => {
    const auth = firebase.auth();
    const provider = new firebase.auth.SAMLAuthProvider(samlProvider);
    auth.signInWithPopup(provider).then((userCredential) => {
      console.log(userCredential);
      onSuccess(userCredential.user);
    })
    .catch((err) => {
      console.log(err);
      setLoading(false);
      setErrorText('Something went wrong. Try again or contact support.')
    });
  }

domain: "global" message: "INVALID_IDP_RESPONSE : Invalid Response: has no assertions." reason: "invalid"

【问题讨论】:

    标签: firebase google-cloud-platform firebase-authentication saml saml-2.0


    【解决方案1】:

    当您打开签名请求(请参阅https://cloud.google.com/identity-platform/docs/web/saml#signing_requests)但未为请求签名配置 IdP 时,可能会发生这种情况。

    假设是这个原因,您要么需要为签名请求配置 IdP(这样更安全),要么在 GCP Identity Platform 中将其关闭。

    【讨论】:

      猜你喜欢
      • 2021-11-01
      • 2021-09-30
      • 2018-01-19
      • 2022-01-17
      • 1970-01-01
      • 1970-01-01
      • 2013-12-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多