Skip to content

Commit 240d9b0

Browse files
committed
Improve comment and don't delete all search params
1 parent 814cee8 commit 240d9b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/server/src/github/github-auth-provider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ export class GitHubAuthProvider extends GenericAuthProvider {
102102
const publicAvatarURL = new URL(avatar_url);
103103
if (publicAvatarURL.host === "private-avatars.githubusercontent.com") {
104104
// github has recently been rolling out private JWT-signed avatar URLs which expire after a short time
105-
// we need to use the public avatar URL instead so that the avatar is displayed correctly and fits into our database (which is capped at 255 chars)
105+
// we need to use the public avatar URL instead so that the avatar is displayed correctly and fits into our database column (which is capped at 255 chars)
106106
publicAvatarURL.host = "avatars.githubusercontent.com";
107-
publicAvatarURL.search = "";
107+
publicAvatarURL.searchParams.delete("jwt");
108108
}
109109

110110
// https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/

0 commit comments

Comments
 (0)