firebase - 在哪里可以找到 JWT 签名所用的 key ?

标签 firebase cryptography firebase-authentication elixir phoenix-framework

我开发了使用 Firebase 作为外部身份验证服务的 phoenix 应用。我用Joken图书馆。它要求我使用函数 with_signer需要一个加密 key 。我想这是 Firebase 签署 JWT 的 key 。问题是——我的假设正确吗?更重要的是 - 我在哪里可以找到这个 key ?

最佳答案

Firebase 应在众所周知的地址发布公钥,您可以使用该公钥来验证 JWT。

docs建议:

Finally, ensure that the ID token was signed by the private key corresponding to the token's kid claim. Grab the public key from https://www.googleapis.com/robot/v1/metadata/x509/securetoken@system.gserviceaccount.com and use a JWT library to verify the signature. Use the value of max-age in the Cache-Control header of the response from that endpoint to know when to refresh the public keys.

关于firebase - 在哪里可以找到 JWT 签名所用的 key ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50078588/

相关文章:

swift - SD 未设置从 Firebase 存储中提取的图像

firebase - 如何从 firebase_auth 测试 "signInWithEmailAndPassword"

javascript - NodeJS 加密和 jsSHA 的 SHA-1 结果不同

javascript - 使用 CryptoJS 在 Javascript 中进行 Java AES 加密

dart - 如何在 flutter 中处理 Firebase Auth 未处理的异常?

javascript - 发生网络错误(例如超时、连接中断或无法访问主机)

ios - 从不同节点查询Firebase数据

java - IllegalBlockSizeException 尝试解密字符串

Firebase 电话验证 : some users don't receive OTP

javascript - 如何在 firestore 中离线读取文档并写入(在线和离线)?