Skip to content

Commit

Permalink
As per spec, set polling to 5s (from 10s)
Browse files Browse the repository at this point in the history
  • Loading branch information
supercairos committed Nov 27, 2023
1 parent b1fbd36 commit 0847036
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ func (c *Config) GetDeviceVerificationURL(ctx context.Context) string {

func (c *Config) GetDeviceAuthTokenPollingInterval(ctx context.Context) time.Duration {
if c.DeviceAuthTokenPollingInterval == 0 {
return time.Second * 10
return time.Second * 5
}
return c.DeviceAuthTokenPollingInterval
}
2 changes: 1 addition & 1 deletion handler/rfc8628/auth_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func Test_HandleDeviceEndpointRequest(t *testing.T) {
Strategy: &hmacshaStrategy,
Config: &fosite.Config{
DeviceAndUserCodeLifespan: time.Minute * 10,
DeviceAuthTokenPollingInterval: time.Second * 10,
DeviceAuthTokenPollingInterval: time.Second * 5,
DeviceVerificationURL: "www.test.com",
AccessTokenLifespan: time.Hour,
RefreshTokenLifespan: time.Hour,
Expand Down

0 comments on commit 0847036

Please sign in to comment.