node.js - Firebase Auth:为什么在刷新令牌请求响应PERMISSION_DENIED一段时间后使用identitytoolkit signInWithCustomToken?
问题描述
我在我的反应站点上有一个实现来使用我的服务器返回的自定义令牌进行身份验证,为此,我firebase.auth().signInWithCustomToken(token)
知道如果您使用这种身份验证,这会提供一个自动请求(https://securetoken.googleapis.com/v1/token?key=[myApiToken]
)在到期时间后刷新令牌这个。但是当这个过期时,我的应用程序开始以以下响应失败请求:
{
"error": {
"code": 403,
"message": "Requests to this API securetoken.googleapis.com method google.identity.securetoken.v1.SecureToken.GrantToken are blocked.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developer console API key",
"url": "https://console.developers.google.com/project/[MyProjectId]/apiui/credential"
}
]
}
]
}
}
我有:
"firebase": "^7.6.1"
"react": "^16.12.0"
解决方案
推荐阅读
- scala - 仅稳定对象成员支持移动重构
- excel - 将条件添加到 p:dataExporter 的目标属性中,以便一次导出两个不同选项卡中的两个数据表,以便在 primefaces 中表现出色
- python - 在 Python 上的 Azure 人脸 API 中进行人脸验证的错误代码请求
- php - 函数调用期间的PHP全局变量错误
- database - 一起使用 Redis 和 MongoDB,最好将每个会话存储在 Redis 中并在会话结束时更新数据库?
- .net - Salesforce .Net 工具包问题
- ionic3 - 离子原生媒体捕获捕获视频持续时间不起作用
- ios - ARKit 两个节点之间的 Y 距离
- php - 如何组织代码以包装 API 和缓存系统
- jquery - 如何仅针对特定元素以角度发出事件?