Skip to content

Commit

Permalink
fix: remove organizations from fly provider
Browse files Browse the repository at this point in the history
  • Loading branch information
kangmingtay committed Oct 11, 2023
1 parent 0fe4285 commit ef0614b
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions internal/api/provider/fly.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,14 @@ type flyProvider struct {
}

type flyUser struct {
ResourceOwnerID string `json:"resource_owner_id"`
UserID string `json:"user_id"`
UserName string `json:"user_name"`
Email string `json:"email"`
Organizations []struct {
ID string `json:"id"`
Role string `json:"role"`
} `json:"organizations"`
Scope []string `json:"scope"`
Application map[string]string `json:"application"`
ExpiresIn int `json:"expires_in"`
CreatedAt int `json:"created_at"`
ResourceOwnerID string `json:"resource_owner_id"`
UserID string `json:"user_id"`
UserName string `json:"user_name"`
Email string `json:"email"`
Scope []string `json:"scope"`
Application map[string]string `json:"application"`
ExpiresIn int `json:"expires_in"`
CreatedAt int `json:"created_at"`
}

// NewFlyProvider creates a Fly oauth provider.
Expand Down Expand Up @@ -90,7 +86,6 @@ func (p flyProvider) GetUserData(ctx context.Context, tok *oauth2.Token) (*UserP
ProviderId: u.UserID,
CustomClaims: map[string]interface{}{
"resource_owner_id": u.ResourceOwnerID,
"organizations": u.Organizations,
"application": u.Application,
"scope": u.Scope,
"created_at": u.CreatedAt,
Expand Down

0 comments on commit ef0614b

Please sign in to comment.