Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit92db437

Browse files
committed
Add comments to code timeout
1 parent70ddc87 commit92db437

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎enterprise/coderd/identityprovider/authorize.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ func Authorize(db database.Store, accessURL *url.URL) http.HandlerFunc {
101101
ID:uuid.New(),
102102
CreatedAt:dbtime.Now(),
103103
// TODO: Configurable expiration? Ten minutes matches GitHub.
104+
// This timeout is only for the code that will be exchanged for the
105+
// access token, not the access token itself. It does not need to be
106+
// long-lived because normally it will be exchanged immediately after it
107+
// is received. If the application does wait before exchanging the
108+
// token (for example suppose they ask the user to confirm and the user
109+
// has left) then they can just retry immediately and get a new code.
104110
ExpiresAt:dbtime.Now().Add(time.Duration(10)*time.Minute),
105111
SecretPrefix: []byte(code.Prefix),
106112
HashedSecret: []byte(code.Hashed),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp