使用Goth获取令牌谷歌云时出错

时间:2017-10-11 03:26:04

标签: google-cloud-platform elixir token google-cloud-storage

我正在使用{:ok,goth} = Goth.Token.for_scope(“https://www.googleapis.com/auth/devstorage.full_control”) 但我看到了一个错误。请帮帮我

** (exit) an exception was raised: ** (UndefinedFunctionError) function :crypto.mpint/1 is undefined or private (crypto) :crypto.mpint(19687873431742193920055970243130294467124206658682087298983794038798216955530975915146333586732314900700035611611045789143545904247799428447896803420118324471667046274052296120024954651561469080093219328190691149886440049200669636272584661976356321702914680136369124759272732574776698998044554776915282967732669956832401458331945711479325049514685797410840542208523089896590986235120222095570675226125560522026179882816977851505433864383972624362893774956738669017687990725035030542706539434148824251987312659383648295704127681204473207295376320651645980971185202320992998884262991006767805018245431366563316696488933)

1 个答案:

答案 0 :(得分:1)

请检查您使用的是Goth 0.6.0或更高版本,以便json_web_token将更新为不依赖mpint/1的最新版本。

更详细的解释:

:crypto.mpint/1已在最新版本的Erlang / OTP 20中删除,因为它在几个版本之前已被弃用。

Goth有一个名为json_web_token的依赖项,直到2017年中期才使用mpint/1。从那时起,0.2.10版本作为紧急修复发布,用于删除加密包中的mpint/1你可以看到Goth在夏天也更新了这种依赖 - https://github.com/peburrows/goth/commit/b983dc15447ee6b59a0f170f5a47da9e298549ff