Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new email feature currently risks runtime failures and likely won’t return an email without requesting the email scope, and the new behavior isn’t covered by existing specs.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR bumps the gem to version 0.0.4 and extends the LINE OmniAuth strategy to surface a user email by verifying the returned ID token during the callback flow.
Changes:
- Add
emailto theinfohash and augmentraw_infowith an email fetched from LINE’s/verifyendpoint. - Capture
id_tokenduringbuild_access_tokento support email verification. - Bump gem version from
0.0.3to0.0.4.
File summaries
| File | Description |
|---|---|
lib/omniauth/strategies/line.rb |
Adds email retrieval via ID token verification and stores id_token during token exchange. |
lib/omniauth-line/version.rb |
Bumps gem version to 0.0.4. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
26
to
30
| name: raw_info['displayName'], | ||
| image: raw_info['pictureUrl'], | ||
| description: raw_info['statusMessage'] | ||
| description: raw_info['statusMessage'], | ||
| email: raw_info["email"] | ||
| } |
Comment on lines
+33
to
+42
| def email | ||
| params = { | ||
| id_token: @id_token, | ||
| client_id: client.id | ||
| } | ||
|
|
||
| response = Net::HTTP.post_form(URI("https://api.line.me/oauth2/v2.1/verify"), params) | ||
| JSON.load(response.body)["email"] | ||
| end | ||
|
|
Comment on lines
+28
to
30
| description: raw_info['statusMessage'], | ||
| email: raw_info["email"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.