Discover Packages
github.com/perfect-panel/server
pkg
oauth
github
package
Version:
v1.15.13
Opens a new window with list of versions in this module.
Published: Jul 29, 2026
License: GPL-3.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
GetPrimaryEmail fetches the primary verified email from the GitHub emails API.
GetUserInfo fetches the user profile from the GitHub API using the access token.
If the email is not publicly visible on the profile, it falls back to the emails API.
type EmailInfo struct {
Email string `json:"email"`
Primary bool `json:"primary"`
Verified bool `json:"verified"`
}
EmailInfo represents a GitHub email address.
type UserInfo struct {
OpenID int64 `json:"id"`
Login string `json:"login"`
Name string `json:"name"`
Email string `json:"email"`
Avatar string `json:"avatar_url"`
HTMLURL string `json:"html_url"`
}
UserInfo represents the GitHub user information.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.