The first primary+verified entry of /user/emails, else nil.
Devise::OmniAuth::GitHub
Inherits Devise::OmniAuth::Strategy < Reference < Object
github strategy — 1:1 with omniauth-github 2.0.1: client endpoints, no default scope, uid = raw_info['id'], email from /user/emails when the configured scope allows it (primary+verified) else raw_info email, extra carries all_emails + token scope (null when absent).
Constants
Constructors
Instance methods
The AuthHash assembled from a token response + raw_info + emails (oracle: gh_hash_user, gh_hash_no_email_scope, gh_hash_uid): uid = raw_info['id'], email via primary_email when the scope allows else raw_info['email'], extra = raw_info + all_emails + token scope (null when absent).
Full callback phase: code → token → user (+emails) → AuthHash.
authorize_params 1:1: response_type=code, scope only when configured (GitHub has no client-side default), 48-hex state.
GET /user/emails — only meaningful with email scope (the gem returns [] without even calling the endpoint).
The configured (strategy options) scope — drives the email access decision, exactly like the gem's options['scope'].
The configured (strategy options) scope — drives the email access decision, exactly like the gem's options['scope'].
POST token_url (authorization_code grant). GitHub answers JSON when asked to (Accept header), like the oauth2 gem's default.