Workday OAuth-错误未经授权的客户端

时间:2019-08-12 17:45:19

标签: javascript node.js oauth workday-api

我正在尝试与Workday创建OAuth集成,但收到未授权客户端错误。我启用了API客户端,获取了秘密和访问密钥,并配置了指向我的服务器的重定向URI。

当我访问https://impl.workday.com/myTenant/authorize?response_type=token&client_id=myClientID时,我被带到允许该应用访问我的工作日的屏幕,我点击了接受,然后重定向到我的服务器。但是,当我查看显示请求URL和标头的服务器日志时,这就是我所看到的:

URL: /workday?error=unauthorized_client

Headers: { host: 'localhost:9001',
connection: 'close',
'cache-control': 'max-age=0',
'upgrade-insecure-requests': '1',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36',
'sec-fetch-mode': 'navigate',
'sec-fetch-user': '?1',
accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
'sec-fetch-site': 'cross-site',
referer: 'https://impl.workday.com/wday/authgwy/myTenant/authorize?response_type=token&client_id=myClientID',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'en-US,en;q=0.9'
}

我希望收到标头“ Location:https://example.com/#access_token=someAccessToken&token_type=Bearer”,但收到未授权的客户端错误。

1 个答案:

答案 0 :(得分:0)

https://impl.workday.com/myTenant/authorize?response_type= 令牌&client_id = myClientID更改为https://impl.workday.com/myTenant/authorize?response_type= 代码&client_id = myClientID已解决了该问题。