Skip to content

Commit

Permalink
Update selfservice/strategy/oidc/provider_microsoft.go
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr authored and splaunov committed Mar 5, 2022
1 parent 29e6a3e commit 0fbd346
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions selfservice/strategy/oidc/provider_microsoft.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"net/http"
"net/url"
"strings"

"github.com/gofrs/uuid"
Expand Down Expand Up @@ -101,13 +102,13 @@ func (m *ProviderMicrosoft) updateSubject(ctx context.Context, claims *Claims, e
defer resp.Body.Close()

var user struct {
Id string `json:"id"`
ID string `json:"id"`
}
if err := json.NewDecoder(resp.Body).Decode(&user); err != nil {
return nil, errors.WithStack(herodot.ErrInternalServerError.WithReasonf("%s", err))
}

claims.Subject = user.Id
claims.Subject = user.ID
}

return claims, nil
Expand Down

0 comments on commit 0fbd346

Please sign in to comment.