Skip to content

Commit 4f9f13b

Browse files
fix: respect promptType=none with offline_access scope
1 parent 7d1a747 commit 4f9f13b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

connector/oidc/oidc.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,11 @@ func (c *oidcConnector) LoginURL(s connector.Scopes, callbackURL, state string)
357357
}
358358

359359
if s.OfflineAccess {
360-
opts = append(opts, oauth2.AccessTypeOffline, oauth2.SetAuthURLParam("prompt", c.promptType))
360+
opts = append(opts, oauth2.AccessTypeOffline)
361+
// Only add prompt parameter if it's not "none"
362+
if c.promptType != "none" {
363+
opts = append(opts, oauth2.SetAuthURLParam("prompt", c.promptType))
364+
}
361365
}
362366
return c.oauth2Config.AuthCodeURL(state, opts...), nil
363367
}

0 commit comments

Comments
 (0)