Skip to content

Authentication providers, investigate static registration #103507

@RMacfarlane

Description

@RMacfarlane

Follow up from #100993 (comment)

The one piece that did not make it in from above is providers and onDidChangeAuthenticationProviders. My hope was to get rid of the need for onDidChangeAuthenticationProviders by having auth provider extensions statically register themselves so that providers could be accurate at startup. However, I haven't found a way to implement this with providers being sync - resolving contribution points from package.json is async (and also currently things handling this live in the renderer), so the ext host piece would need to block on this.

One option is to leave it as it currently is, which means that consumers would have to subscribe to onDidChangeAuthenticationProviders to see if the provider they're looking for is registered. Another is to make providers back into getProviders, an async function, which would eliminate the need for static registration and could activate the auth provider extension in the same way that getSession does.

For the static registration, the contribution point could look like:

"authentication": [
    {
        "label": "GitHub",
        "id": "github"
    }
]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions