fix(oidc): refresh token for device authorization (#7104)

fix(oidc); refresh token for device authorization

Due to a mis-alignment of OIDC interface and concrete implementations in zitadel, requesting a refresh token for device authorization would fail.
This change adds the possibility to to use the op.IDTokenRequest directly.
Also, the UserAgentID is dropped as required parameter, as devices do not have a user agent.
This commit is contained in:
Tim Möhlmann authored and GitHub committed 2023-12-21 13:57:33 +00:00
1 parent 5ce542b959
commit 85eb2eda0b
2 files changed
+12 -9

No files matched your search

+1 -1
View File
@@ -45,7 +45,7 @@ func (c *Commands) AddNewRefreshTokenAndAccessToken(
refreshIdleExpiration time.Duration,
authTime time.Time,
) (accessToken *domain.Token, newRefreshToken string, err error) {
if userID == "" || agentID == "" || clientID == "" {
if userID == "" || clientID == "" {
return nil, "", zerrors.ThrowInvalidArgument(nil, "COMMAND-adg4r", "Errors.IDMissing")
}
userWriteModel := NewUserWriteModel(userID, orgID)