Skip to content

Feature/version 0.0.4 - #5

Open
lipowen wants to merge 3 commits into
DMCPartners:masterfrom
kaikhq:feature/version-0.0.4
Open

lipowen wants to merge 3 commits into
DMCPartners:masterfrom
kaikhq:feature/version-0.0.4

Conversation

@lipowen

@lipowen lipowen commented Feb 5, 2023

Copy link
Copy Markdown

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 email to the info hash and augment raw_info with an email fetched from LINE’s /verify endpoint.
  • Capture id_token during build_access_token to support email verification.
  • Bump gem version from 0.0.3 to 0.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"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants