Use email api call
[?]
Dec 30, 2020, 8:32 PM
3CH2DFTVNEMFSXYZULOUAJFH2M2RXDPHJJL34TI3TVR34IMTEU7ACDependencies
- [2]
GNQYRBAGImplement GitHub logins - [3]
3QWDDLBRAdd support for logging in via a Google account - [*]
XJRJ4J7MAdd user registration
Change contents
- edit in src/lib/Hydra/Controller/User.pm at line 183
$response = $ua->get('https://api.github.com/user/emails', Accept => 'application/vnd.github.v3+json', Authorization => "token $access_token");error($c, "Did not get a response from GitHub for email info.") unless $response->is_success;$data = decode_json($response->decoded_content) or die;my $email;foreach my $eml (@{$data}) {$email = $eml->{email} if $eml->{verified} && $eml->{primary};print STDERR "$eml->{email}\n";} - edit in src/lib/Hydra/Controller/User.pm at line 195
print STDERR "$email\n"; - edit in src/lib/Hydra/Controller/User.pm at line 198
- replacement in src/lib/Hydra/Controller/User.pm at line 199
doEmailLogin($self, $c, "github", $data->{email}, $data->{name} // undef);doEmailLogin($self, $c, "github", $email, $data->{name} // undef);