sorry. please help me.
I want to add “LINE” to the authentication providers.
Based on this article, I built it as follows.
Developed with reference to the following article. but I get the following error:
{
"data": null,
"error": {
"status": 400,
"name": "ApplicationError",
"message": "Unknown provider.",
"details": {}
}
}
I have successfully authenticated and successfully obtained an AccessToken.
What should I do to get rid of this error?
Thank you
Below is the code I developed.
I temporarily registered it in provider-registry as follows.
async line({ accessToken }) {
console.log("accessToken", accessToken);
const line = purest({ provider: "line" });
const me = await line.get("me").auth(accessToken).request();
// test data
return {
username: "test",
email: "test@strapi.io",
};
},
I registered the information in bootstrapi as follows
const grantConfig = {
...getGrantConfig(baseURL),
line: {
enabled: true,
state: true,
nonce: true,
oauth: 2,
icon: "line",
key: process.env.LINE_OAUTH_KEY,
secret: process.env.LINE_OAUTH_SECRET,
callback: `${baseURL}/line/callback`,
scope: ["openid", "identify"],
},
};
I also referenced this topic. Thanks to this article, most of the errors have been resolved.