@logto/connector-github 1.0.0-beta.18 → 1.0.0-beta.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -40,6 +40,8 @@ Follow the [creating an OAuth App](https://docs.github.com/en/developers/apps/bu
40
40
  Name your new OAuth application in **Application name** and fill up **Homepage URL** of the app.
41
41
  You can leave **Application description** field blank and customize **Authorization callback URL** as `${your_logto_origin}/callback/${connector_id}`. The `connector_id` can be found on the top bar of the Logto Admin Console connector details page.
42
42
 
43
+ > Note: If you encounter the error message "The redirect_uri MUST match the registered callback URL for this application." when logging in, try aligning the Authorization Callback URL of your GitHub OAuth App and your Logto App's redirect URL (of course, including the protocol) to resolve the issue.
44
+
43
45
  We suggest not to check the box before **Enable Device Flow**, or users who sign in with GitHub on mobile devices must confirm the initial sign-in action in the GitHub app. Many GitHub users do not install the GitHub mobile app on their phones, which could block the sign-in flow. Please ignore our suggestion if you are expecting end-users to confirm their sign-in flow. See details of [device flow](https://docs.github.com/en/developers/apps/building-oauth-apps/authorizing-oauth-apps#device-flow).
44
46
 
45
47
  ## Managing OAuth apps
@@ -94,6 +96,8 @@ GitHub 连接器让终端用户可以用 GitHub 账号,通过 GitHub OAuth 2.0
94
96
  为新 _OAuth 应用程序_ 取名,并填入「Application name」栏;并填写应用的网页地址「Homepage URL」。
95
97
  你需要将 `${your_logto_origin}/callback/${connector_id}` 填写到「Authorization callback URL」栏;「Application description」栏可以选择留白。`connector_id` 在管理控制台相应连接器的详情页的顶栏中可以找到。
96
98
 
99
+ > 注意:如果登录时报错 `The redirect_uri MUST match the registered callback URL for this application.`,可以尝试将 Authorization Callback URL 和 Logto App 的 Redirect URL 保持严格一致(包括协议类型)以解决该问题。
100
+
97
101
  我们建议不要勾选「Enable Device Flow」,否则希望在移动设备上登录的用户需要在 GitHub 应用中确认登录的动作。许多 GitHub 用户在移动端设备上不会安装应用,这可能阻碍这些用户的登录流程。
98
102
 
99
103
  如果你的确期望终端用户在移动设备上需要有确认登录的动作,请忽略我们的建议。查看更多关于 [设备流程](https://docs.github.com/cn/developers/apps/building-oauth-apps/authorizing-oauth-apps#device-flow) 的详情。
package/logo-dark.svg CHANGED
@@ -1,3 +1,10 @@
1
1
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M12 2.24658C9.62547 2.24668 7.32846 3.0917 5.51996 4.63043C3.71146 6.16916 2.5095 8.3012 2.12913 10.6451C1.74876 12.9889 2.21481 15.3917 3.4439 17.4233C4.67298 19.455 6.58488 20.9831 8.83752 21.7341C9.33752 21.8216 9.52502 21.5216 9.52502 21.2591C9.52502 21.0216 9.51251 20.2341 9.51251 19.3966C7 19.8591 6.35 18.7841 6.15 18.2216C5.92807 17.6745 5.57627 17.1897 5.125 16.8091C4.775 16.6216 4.275 16.1591 5.11249 16.1466C5.43227 16.1813 5.73898 16.2926 6.00663 16.471C6.27427 16.6494 6.49496 16.8897 6.65 17.1716C6.78677 17.4173 6.97068 17.6336 7.19119 17.8081C7.4117 17.9826 7.66447 18.1118 7.93503 18.1885C8.20559 18.2651 8.48861 18.2876 8.76788 18.2547C9.04714 18.2218 9.31717 18.134 9.56248 17.9966C9.60577 17.4882 9.83234 17.0129 10.2 16.6591C7.975 16.4091 5.65 15.5466 5.65 11.7216C5.63594 10.7278 6.00268 9.76619 6.675 9.03411C6.36928 8.17033 6.40505 7.2224 6.775 6.38411C6.775 6.38411 7.61247 6.1216 9.525 7.40911C11.1613 6.95909 12.8887 6.95909 14.525 7.40911C16.4375 6.10911 17.275 6.38411 17.275 6.38411C17.645 7.22238 17.6808 8.17034 17.375 9.03411C18.0493 9.76494 18.4164 10.7273 18.4 11.7216C18.4 15.5591 16.0625 16.4091 13.8375 16.6591C14.0761 16.901 14.2599 17.1914 14.3764 17.5106C14.4929 17.8298 14.5393 18.1704 14.5125 18.5091C14.5125 19.8466 14.5 20.9216 14.5 21.2591C14.5 21.5216 14.6875 21.8341 15.1875 21.7341C17.4362 20.977 19.3426 19.4453 20.5664 17.4126C21.7903 15.3799 22.2519 12.9784 21.8689 10.6368C21.4859 8.29523 20.2832 6.16595 18.4755 4.62909C16.6678 3.09223 14.3727 2.24782 12 2.24658Z" fill="white"/>
2
+ <g clip-path="url(#clip0_865_12456)">
3
+ <path d="M11.9999 0.300049C9.15054 0.300167 6.39414 1.31419 4.22396 3.16068C2.05378 5.00717 0.61143 7.56562 0.154992 10.3783C-0.301447 13.1909 0.257812 16.0742 1.7327 18.5122C3.20759 20.9503 5.50186 22.7839 8.205 23.6851C8.80499 23.7902 9.02999 23.4302 9.02999 23.1151C9.02999 22.8301 9.01498 21.8851 9.01498 20.8801C5.99999 21.4351 5.22 20.1452 4.98 19.4702C4.71369 18.8137 4.29153 18.2319 3.75001 17.7751C3.33001 17.5501 2.73001 16.9951 3.73499 16.9801C4.11874 17.0218 4.48679 17.1553 4.80796 17.3694C5.12913 17.5835 5.39395 17.8719 5.57999 18.2101C5.74412 18.505 5.96481 18.7645 6.22942 18.9739C6.49403 19.1833 6.79736 19.3384 7.12202 19.4304C7.44669 19.5224 7.78631 19.5494 8.12143 19.5099C8.45655 19.4703 8.78058 19.3651 9.07494 19.2001C9.12689 18.5901 9.39877 18.0197 9.83996 17.5952C7.16998 17.2952 4.38 16.2601 4.38 11.6701C4.36314 10.4775 4.80322 9.32362 5.60999 8.44512C5.24313 7.40858 5.28606 6.27105 5.72999 5.26511C5.72999 5.26511 6.73495 4.95009 9.02997 6.49511C10.9935 5.95508 13.0664 5.95508 15.0299 6.49511C17.3249 4.9351 18.3299 5.26511 18.3299 5.26511C18.7739 6.27104 18.8168 7.40859 18.4499 8.44512C19.2591 9.32211 19.6996 10.477 19.6799 11.6701C19.6799 16.2751 16.8749 17.2952 14.2049 17.5952C14.4913 17.8854 14.7119 18.2339 14.8516 18.617C14.9914 19 15.0471 19.4087 15.0149 19.8152C15.0149 21.4202 14.9999 22.7102 14.9999 23.1152C14.9999 23.4302 15.2249 23.8052 15.8249 23.6852C18.5233 22.7766 20.811 20.9387 22.2796 18.4994C23.7482 16.0601 24.3021 13.1783 23.8425 10.3684C23.3829 7.55845 21.9397 5.00331 19.7705 3.15907C17.6012 1.31483 14.8472 0.301531 11.9999 0.300049Z" fill="white"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_865_12456">
7
+ <rect width="24" height="24" fill="white"/>
8
+ </clipPath>
9
+ </defs>
3
10
  </svg>
package/logo.svg CHANGED
@@ -1,3 +1,10 @@
1
1
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M12 2.2467C9.6255 2.2468 7.32849 3.09182 5.51999 4.63055C3.71149 6.16929 2.50953 8.30133 2.12916 10.6452C1.74879 12.989 2.21485 15.3918 3.44393 17.4235C4.67301 19.4551 6.58491 20.9832 8.83755 21.7342C9.33755 21.8217 9.52505 21.5217 9.52505 21.2592C9.52505 21.0217 9.51254 20.2342 9.51254 19.3967C7.00003 19.8592 6.35003 18.7842 6.15003 18.2217C5.9281 17.6747 5.5763 17.1899 5.12503 16.8092C4.77503 16.6217 4.27503 16.1592 5.11252 16.1467C5.4323 16.1814 5.73901 16.2927 6.00666 16.4711C6.2743 16.6495 6.49499 16.8899 6.65003 17.1717C6.7868 17.4174 6.97071 17.6337 7.19122 17.8082C7.41173 17.9827 7.6645 18.112 7.93506 18.1886C8.20562 18.2652 8.48864 18.2877 8.76791 18.2548C9.04717 18.2219 9.3172 18.1342 9.56251 17.9967C9.6058 17.4883 9.83237 17.013 10.2 16.6592C7.97503 16.4092 5.65003 15.5467 5.65003 11.7217C5.63597 10.7279 6.00271 9.76631 6.67503 9.03423C6.36931 8.17045 6.40508 7.22252 6.77503 6.38423C6.77503 6.38423 7.6125 6.12172 9.52503 7.40923C11.1613 6.95921 12.8887 6.95921 14.525 7.40923C16.4375 6.10923 17.275 6.38423 17.275 6.38423C17.645 7.22251 17.6808 8.17046 17.375 9.03423C18.0494 9.76506 18.4164 10.7275 18.4 11.7217C18.4 15.5592 16.0625 16.4092 13.8375 16.6592C14.0762 16.9011 14.26 17.1915 14.3764 17.5107C14.4929 17.83 14.5393 18.1705 14.5125 18.5092C14.5125 19.8468 14.5 20.9217 14.5 21.2592C14.5 21.5217 14.6875 21.8342 15.1875 21.7342C17.4362 20.9771 19.3426 19.4455 20.5664 17.4128C21.7903 15.38 22.2519 12.9785 21.8689 10.6369C21.4859 8.29535 20.2832 6.16608 18.4755 4.62922C16.6678 3.09235 14.3727 2.24794 12 2.2467Z" fill="black"/>
2
+ <g clip-path="url(#clip0_865_12254)">
3
+ <path d="M11.9999 0.296021C9.15054 0.296139 6.39414 1.31016 4.22396 3.15665C2.05378 5.00314 0.61143 7.5616 0.154992 10.3742C-0.301447 13.1869 0.257812 16.0702 1.7327 18.5082C3.20759 20.9462 5.50186 22.7799 8.205 23.6811C8.80499 23.7861 9.02999 23.4261 9.02999 23.1111C9.02999 22.8261 9.01498 21.8811 9.01498 20.8761C5.99999 21.4311 5.22 20.1411 4.98 19.4661C4.71369 18.8096 4.29153 18.2279 3.75001 17.7711C3.33001 17.5461 2.73001 16.9911 3.73499 16.9761C4.11874 17.0178 4.48679 17.1513 4.80796 17.3654C5.12913 17.5795 5.39395 17.8679 5.57999 18.2061C5.74412 18.5009 5.96481 18.7605 6.22942 18.9699C6.49403 19.1793 6.79736 19.3344 7.12202 19.4264C7.44669 19.5183 7.78631 19.5453 8.12143 19.5058C8.45655 19.4663 8.78058 19.3611 9.07494 19.1961C9.12689 18.586 9.39877 18.0156 9.83996 17.5911C7.16998 17.2911 4.38 16.2561 4.38 11.6661C4.36314 10.4735 4.80322 9.31959 5.60999 8.44109C5.24313 7.40455 5.28606 6.26702 5.72999 5.26108C5.72999 5.26108 6.73495 4.94606 9.02997 6.49108C10.9935 5.95105 13.0664 5.95105 15.0299 6.49108C17.3249 4.93108 18.3299 5.26108 18.3299 5.26108C18.7739 6.26701 18.8168 7.40456 18.4499 8.44109C19.2591 9.31808 19.6996 10.473 19.6799 11.6661C19.6799 16.2711 16.8749 17.2911 14.2049 17.5911C14.4913 17.8814 14.7119 18.2299 14.8516 18.6129C14.9914 18.996 15.0471 19.4046 15.0149 19.8111C15.0149 21.4162 14.9999 22.7061 14.9999 23.1112C14.9999 23.4262 15.2249 23.8012 15.8249 23.6812C18.5233 22.7726 20.811 20.9346 22.2796 18.4954C23.7482 16.0561 24.3021 13.1743 23.8425 10.3643C23.3829 7.55442 21.9397 4.99929 19.7705 3.15505C17.6012 1.31081 14.8472 0.297502 11.9999 0.296021Z" fill="black"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_865_12254">
7
+ <rect width="24" height="24" fill="white"/>
8
+ </clipPath>
9
+ </defs>
3
10
  </svg>
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "logo-dark.svg"
12
12
  ],
13
13
  "dependencies": {
14
- "@logto/connector-kit": "1.0.0-rc.0",
14
+ "@logto/connector-kit": "1.0.0-rc.2",
15
15
  "@silverhand/essentials": "2.1.0",
16
16
  "got": "^12.5.3",
17
17
  "snakecase-keys": "^5.1.0",
@@ -52,7 +52,7 @@
52
52
  "access": "public"
53
53
  },
54
54
  "name": "@logto/connector-github",
55
- "version": "1.0.0-beta.18",
55
+ "version": "1.0.0-beta.19",
56
56
  "description": "Github web connector implementation.",
57
57
  "author": "Silverhand Inc. <contact@silverhand.io>",
58
58
  "scripts": {