We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用默认的LineRequest在获取AccessToken出现问题.原因为Line的获取接口的参数不是使用查询参数而是表单参数.详情请看https://developers.line.biz/en/reference/line-login/#oauth
正常使用就会复现
将LineRequest的getAccessToken改写.
protected AuthToken getAccessToken(AuthCallback authCallback) { Map params = new HashMap<>(); params.put("grant_type", "authorization_code"); params.put("code", authCallback.getCode()); params.put("redirect_uri", config.getRedirectUri()); params.put("client_id", config.getClientId()); params.put("client_secret", config.getClientSecret()); String response = new HttpUtils(config.getHttpConfig()).post(source.accessToken(), params, false); JSONObject accessTokenObject = JSONObject.parseObject(response); return AuthToken.builder() .accessToken(accessTokenObject.getString("access_token")) .refreshToken(accessTokenObject.getString("refresh_token")) .expireIn(accessTokenObject.getIntValue("expires_in")) .idToken(accessTokenObject.getString("id_token")) .scope(accessTokenObject.getString("scope")) .tokenType(accessTokenObject.getString("token_type")) .build(); }
The text was updated successfully, but these errors were encountered:
谢谢,1.16.3 版本稍后发布
Sorry, something went wrong.
🐛 解决 Line 的 bug。Github Issue (#122)
39b113b
https://github.com/justauth/JustAuth/releases/tag/v1.16.3 已发布
zhangyd-c
No branches or pull requests
问题描述
使用默认的LineRequest在获取AccessToken出现问题.原因为Line的获取接口的参数不是使用查询参数而是表单参数.详情请看https://developers.line.biz/en/reference/line-login/#oauth
环境
复现方法
正常使用就会复现
解决方案
将LineRequest的getAccessToken改写.
The text was updated successfully, but these errors were encountered: