mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-05-07 21:08:12 +00:00
fix: delete totp pending session cookie on totp success
This commit is contained in:
@@ -27,7 +27,7 @@ func defaultExtractor(client *http.Client, url string) (*model.Claims, error) {
|
||||
return simpleReq[model.Claims](client, url, nil)
|
||||
}
|
||||
|
||||
func githubExtractor(client *http.Client, url string) (*model.Claims, error) {
|
||||
func githubExtractor(client *http.Client, _ string) (*model.Claims, error) {
|
||||
var user model.Claims
|
||||
|
||||
userInfo, err := simpleReq[GithubUserInfoResponse](client, "https://api.github.com/user", map[string]string{
|
||||
@@ -49,7 +49,7 @@ func githubExtractor(client *http.Client, url string) (*model.Claims, error) {
|
||||
}
|
||||
|
||||
for _, email := range *userEmails {
|
||||
if email.Primary {
|
||||
if email.Primary && email.Verified {
|
||||
user.Email = email.Email
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user