Skip to content

Commit 7e4ed87

Browse files
committed
Add TODO
1 parent 5db3d25 commit 7e4ed87

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

coderd/database/dbgen/generator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ func WorkspaceProxy(t testing.TB, db database.Store, orig database.WorkspaceProx
354354
CreatedAt: takeFirst(orig.CreatedAt, database.Now()),
355355
UpdatedAt: takeFirst(orig.UpdatedAt, database.Now()),
356356
})
357-
require.NoError(t, err, "insert app")
357+
require.NoError(t, err, "insert proxy")
358358
return secret, resource
359359
}
360360

coderd/workspaceapps/db.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ func (p *DBTokenProvider) IssueToken(ctx context.Context, rw http.ResponseWriter
154154
// Otherwise, we need to redirect to the app auth endpoint, which will
155155
// redirect back to the app (with an encrypted API key) after the user
156156
// has logged in.
157+
//
158+
// TODO: We should just make this a "BrowserURL" field on the issue struct. Then
159+
// we can remove this logic and just defer to that. It can be set closer to the
160+
// actual initial request that makes the IssueTokenRequest. Eg the external moon.
161+
// This would replace RawQuery and AppPath fields.
157162
redirectURI := *appBaseURL
158163
if dbReq.AppURL != nil {
159164
// Just use the user's current path and query if set.

coderd/workspaceapps/provider.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ type ResolveRequestOpts struct {
2929
AppHostname string
3030

3131
AppRequest Request
32+
// TODO: Replace these 2 fields with a "BrowserURL" field which is used for
33+
// redirecting the user back to their initial request after authenticating.
3234
// AppPath is the path under the app that was hit.
3335
AppPath string
3436
// AppQuery is the raw query of the request.

0 commit comments

Comments
 (0)