coder / backstage-plugins

Official Coder plugins for the Backstage platform
40 stars 3 forks source link

feat: add auth fallback logic for when official Coder components are not mounted #128

Closed Parkreiner closed 5 months ago

Parkreiner commented 5 months ago

Closes #111 Did not expect this to the hardest part of the umbrella issue.

Video demo: https://github.com/coder/backstage-plugins/assets/28937484/1a859f52-168c-436e-aa60-014bc36c97f1

Changes made

Notes

Remaining pieces for umbrella issue

code-asher commented 5 months ago

About to review, but I wanted to check if my intuition here is right: when we switch to OAuth, I imagine some/most of this goes away? Since by just asking for the token, that triggers Backstage's UI for the OAuth flow, and it resolves once that flow is done or canceled.

Parkreiner commented 5 months ago

About to review, but I wanted to check if my intuition here is right: when we switch to OAuth, I imagine some/most of this goes away? Since by just asking for the token, that triggers Backstage's UI for the OAuth flow, and it resolves once that flow is done or canceled.

@code-asher Possibly? I was under the impression that we'd be keeping both forms of auth (though obviously pushing users to prefer the OAuth version). In which case, this might not go away, but just become more deemphasized

Depending on what oauth looks like, we could make it so that these main auth components never actually mount, and you don't have to worry about the fallback UI