我正在尝试使用Firebase管理员SDK生成自定义令牌
const uid = '91f0bf4c-3e3c-441c-a21d-6a7fee341db5'
firebaseAdmin.auth().createCustomToken(uid)
Run Code Online (Sandbox Code Playgroud)
使用此特定的uid有时,自定义令牌会起作用,而有时在客户端上使用authWithCustomToken()时,会出现此错误:
“ auth / invalid-custom-token”自定义令牌格式不正确。请检查文档。”
有什么办法可以调试令牌的运行情况?从表面上看,“好”令牌和“坏”令牌看起来相同:
它们分为3部分,中间用 .