python - Strange Error with Django oauth-toolkit and Azure App Service. Returns 401 {"detail":"Error decoding token."} when attempting to authenticate token
问题描述
Hi I am deploying an app to Azure App Service using Django Rest Framework with OAuth2 authentication handled by django-oauth-toolkit (https://github.com/jazzband/django-oauth-toolkit). Recently when trying to connect to my React frontend I have found out that I cannot successfully authorize despite having an access token. When I make a the following API call (as suggested by the documentation):
curl 'http://exampleurl.azurewebsites.net/endpoint/' -H 'authorization:Bearer <sampletoken>'
I get the following response:
{"detail":"Error decoding token."}
I cannot recreate this error locally nor can I find any information about this error anywhere online. I even searched the repository for the error to see if I could find what triggers it, unfortunately no luck.
Has anyone else ever experience this or can give me some insight on what potentially occurred in my deployment to cause this? I also deleted out my old deployment and even app service to completely start from scratch and the problem persisted.
解决方案
推荐阅读
- azure-data-factory - 如何将 Azure 数据流输出动态放置在以日期命名的文件夹中
- sql - 在 PostgreSQL 中将双精度格式化为“MI:SS”
- swift - reloadAllTimelines 不适用于 UserDefaults
- java - 使用对象映射器反序列化具有 null 作为值的属性
- c++ - C++ Visual Studio Windows:如何在 dll 中声明但不定义外部函数
- javascript - Discord.JS 邀请创建事件?
- django - 从 django 关系中的单独模型中检索多行
- scala - 播放框架并阅读 Scala 注释
- php - Illuminate\Database\QueryException: SQLSTATE[42S02]: Base table or view not found: 1146 Table (truncated
- linux - 为什么在终端中键入“strace ls”时无法在 strace 输出中查看 clone() 系统调用?