Skip to content

Commit 155694b

Browse files
authored
Merge pull request #102 from arodu/feature/login-github
Add Github social login
2 parents 03907b6 + b345914 commit 155694b

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/Social/Mapper/Github.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
/**
5+
* Copyright 2010 - 2025, Cake Development Corporation (https://www.cakedc.com)
6+
*
7+
* Licensed under The MIT License
8+
* Redistributions of files must retain the above copyright notice.
9+
*
10+
* @copyright Copyright 2010 - 2025, Cake Development Corporation (https://www.cakedc.com)
11+
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
12+
*/
13+
14+
namespace CakeDC\Auth\Social\Mapper;
15+
16+
use Cake\Utility\Hash;
17+
18+
/**
19+
* Github Mapper
20+
*/
21+
class Github extends AbstractMapper
22+
{
23+
/**
24+
* Map for provider fields
25+
*
26+
* @var array
27+
*/
28+
protected array $_mapFields = [
29+
'username' => 'login',
30+
'full_name' => 'name',
31+
'avatar' => 'avatar_url',
32+
'link' => 'html_url',
33+
'locale' => 'location',
34+
];
35+
}

0 commit comments

Comments
 (0)