Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add id_token to the user object, set in openid-connect provider #297

Merged
merged 1 commit into from Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions providers/openidConnect/openidConnect.go
Expand Up @@ -6,12 +6,13 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/markbates/goth"
"golang.org/x/oauth2"
"io/ioutil"
"net/http"
"strings"
"time"

"github.com/markbates/goth"
"golang.org/x/oauth2"
)

const (
Expand Down Expand Up @@ -173,6 +174,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) {
RefreshToken: sess.RefreshToken,
ExpiresAt: expiresAt,
RawData: claims,
IDToken: sess.IDToken,
}

p.userFromClaims(claims, &user)
Expand Down
1 change: 1 addition & 0 deletions user.go
Expand Up @@ -27,4 +27,5 @@ type User struct {
AccessTokenSecret string
RefreshToken string
ExpiresAt time.Time
IDToken string
}