Skip to content

Technical debt: Re-unify AuthProviderInfo and AuthProviderEntry #8788

@jankeromnes

Description

@jankeromnes

Is your feature request related to a problem? Please describe

We currently have two protocol shapes that are very similar:

export interface AuthProviderInfo {
readonly authProviderId: string;
readonly authProviderType: string;
readonly host: string;
readonly ownerId?: string;
readonly verified: boolean;
readonly isReadonly?: boolean;
readonly hiddenOnDashboard?: boolean;
readonly loginContextMatcher?: string;
readonly disallowLogin?: boolean;
readonly icon?: string;
readonly description?: string;
readonly settingsUrl?: string;
readonly scopes?: string[];
readonly requirements?: {
readonly default: string[];
readonly publicRepo: string[];
readonly privateRepo: string[];
}
}
export interface AuthProviderEntry {
readonly id: string;
readonly type: AuthProviderEntry.Type;
readonly host: string;
readonly ownerId: string;
readonly status: AuthProviderEntry.Status;
readonly oauth: OAuth2Config;
/** A random string that is to change whenever oauth changes (enforced on DB level) */
readonly oauthRevision?: string;
}

AuthProviderInfo vs AuthProviderEntry:

  • authProviderId vs id
  • authProviderType vs type
  • host 👍
  • ownerId 👍 (sometimes)
  • verified = true vs status = "verified"
  • (usage concerns) vs (oauth config)

Describe the behaviour you'd like

It would be great to re-unify them. 🧹 ✨

Describe alternatives you've considered

Additional context

For more context, see Slack thread (internal)

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev experienceAnything related to developing Gitpod itselfmeta: never-staleThis issue can never become staleteam: webappIssue belongs to the WebApp teamtype: improvementImproves an existing feature or existing code

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions