Google OAuth Login in DRF application raise Invalid token type.

huangapple go评论63阅读模式
英文:

Google OAuth Login in DRF application raise Invalid token type

问题

我在我的DRF应用程序中使用all-authdj-rest-auth实现了Google OAuth,但出现某种原因停止工作。

回溯显示JWT,但出于某种原因,allauth引发了这个错误:

  raise DecodeError(f"Invalid token type. Token must be a {bytes}")

回溯_1

回溯_2

我尝试遵循此教程,但无法重现这种情况。

代码在此PR中。

有人遇到相同的错误吗?

英文:

I had implemented Google OAuth in my DRF application using all-auth and dj-rest-auth, but for some reason stop working.

Traceback shows the JWT, but for some reason, allauth raise this

  raise DecodeError(f"Invalid token type. Token must be a {bytes}")

Traceback_1

Traceback_2

I tried to follow this tutorial but couldn't reproduce the scenario.

The code is at this PR

Does anyone have the same error?

答案1

得分: 0

我将dj-rest-auth降级到版本2.2.7,然后一切都恢复正常。

英文:

I downgraded dj-rest-auth to version 2.2.7 and all go live again

huangapple
  • 本文由 发表于 2023年3月1日 08:12:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/75598500.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定