Skip to content

Commit

Permalink
fix(providers): Refactor Line Provider (#2917)
Browse files Browse the repository at this point in the history
* feat(providers): Refactor Line Provider

* Use static wellKnown + retrieve email

* Remove issuer
  • Loading branch information
ThangHuuVu authored Oct 8, 2021
1 parent 19e326e commit 129d161
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
3 changes: 3 additions & 0 deletions app/.env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ TWITCH_SECRET=
TWITTER_ID=
TWITTER_SECRET=

LINE_ID=
LINE_SECRET=

# Example configuration for a Gmail account (will need SMTP enabled)
EMAIL_SERVER=smtps://user@gmail.com:password@smtp.gmail.com:465
EMAIL_FROM=user@gmail.com
Expand Down
15 changes: 7 additions & 8 deletions src/providers/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ export default function LINE(options) {
id: "line",
name: "LINE",
type: "oauth",
authorization:
"https://access.line.me/oauth2/v2.1/authorize?scope=openid+profile",
token: "https://api.line.me/oauth2/v2.1/token",
userinfo: "https://api.line.me/v2/profile",
authorization: { params: { scope: "openid profile" } },
idToken: true,
wellKnown: "https://access.line.me/.well-known/openid-configuration",
profile(profile) {
return {
id: profile.userId,
name: profile.displayName,
email: null,
image: profile.pictureUrl,
id: profile.sub,
name: profile.name,
email: profile.email,
image: profile.picture,
}
},
options,
Expand Down

0 comments on commit 129d161

Please sign in to comment.